Update change_settings.md

This commit is contained in:
David Leutgeb 2024-08-08 10:41:20 +02:00
parent 550434f33a
commit 0f356a9b79

View File

@ -31,3 +31,22 @@ select sourcefile, name,sourceline,error from pg_file_settings where error is no
```
select pg_hba_file_rules();
```
## Check vacuuming and autovacuuming date for tables per database
Switch to the desired database and then you run this query to see the vaccum status.
```
SELECT
schemaname,
relname,
last_vacuum,
last_autovacuum,
n_dead_tup
FROM
pg_stat_all_tables
WHERE
schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY
n_dead_tup DESC;
```