Skip to content

Adding table-level recommendations #54

@psvampa

Description

@psvampa

We have pop-ups for table information, which include a recommendations section.

We also display wide table-level information, such as bloat, the number of vacuums executed, etc., left to the user's understanding.

While the pg_gather tool is handy for users with a certain level of knowledge, those with less experience might underutilize it simply because they don’t know how to interpret the data (even though that data is highlighted in red).

Perhaps the bloat information could be leveraged to provide recommendations. For instance, in my particular case, I prefer tables to have less than 10% bloat and find it terrifying when more than 20% bloat. A benchmark-based recommendation could be established, for example, suggesting bloat removal for any table exceeding x% bloat.

This concept could also apply to situations like the number of vacuums. Currently, pg_gather highlights in red any table with a high number of daily vacuums, but it does not provide specific suggestions for parameter adjustments (e.g., autovacuum_vacuum_threshold or autovacuum_vacuum_scale_factor).

Similar recommendations could be made, for example, if the number of live tuples/dead tuples is very high and the vacuum has not been executed.

Additional table-level recommendations could include warnings, such as identifying if a table lacks a PK/UK while logical replication is active in the database. While REPLICA IDENTITY currently does not require the use of PK/UK, not having them in place could lead to performance issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions