NikolayS / postgres_dba

The missing set of useful tools for Postgres DBAs and all engineers
BSD 3-Clause "New" or "Revised" License
1.03k stars 113 forks source link

Feature request: List reloptions #61

Open jalexandre0 opened 1 year ago

jalexandre0 commented 1 year ago

Sometimes I need to found tables with individual adjustments like autovacuum_scale_factor ou autovacuum disabled.

I use this query and think it would be useful for other people.

SELECT relname as table, nspname as schema, relkind, reloptions 
FROM
    pg_class c
    JOIN pg_namespace n ON c.relnamespace = n.oid
WHERE reloptions IS NOT NULL AND relname != 'pg_stats'
ORDER BY 2,1;

What do you people think? It is useful enough to open a pr?