PostgreSQL Autovacuum – Demystified

You may also like...

1 Response

  1. Ludovic says:

    Hello,
    In the very useful (thank you !) “Query to check the tables and its dead tuples”, I think there is a little mistake here :
    “date_trunc(‘minute’,greatest(pg_stat_get_last_analyze_time(C.oid), pg_stat_get_last_analyze_time(C.oid))) AS last_analyze”

    I think it should be “pg_stat_get_last_AUTOanalyze_time” the second time, as in the model above for vacuum/autovacuum
    “date_trunc(‘minute’,greatest(pg_stat_get_last_vacuum_time(C.oid), pg_stat_get_last_autovacuum_time(C.oid))) AS last_vacuum”

    And why date_trunc by minutes (after the greatest) ?
    In the final output, it prints with seconds anyhow : “2019-12-28 05:59:02”

Leave a Reply