5

If I run the following

VACUUM myTable;

this gets recorded in the postgres system tables and can be seen with

select last_vacuum, vacuum_count from pg_stat_all_tables where relname= 'mytable';

However, doing a VACUUM FULL seems to go unrecorded.

How can I tell when the last VACUUM FULL was run against a table?

1
  • A vacuum full rewrites the table to a new file so logically that table has never been vacuumed full, the previous incarnation was?? If you really want to know you can record the filenode for a table and check when it changed. I can't see why you would wan t to know this information though ?
    – Gurmokh
    May 18, 2021 at 13:20

1 Answer 1

9

PostgreSQL doesn't track that information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.