Skip to content

Instantly share code, notes, and snippets.

@bitdivine
Last active June 3, 2016 09:01
Show Gist options
  • Select an option

  • Save bitdivine/6c170c05d101b3b397d8ad2fbe7dbe85 to your computer and use it in GitHub Desktop.

Select an option

Save bitdivine/6c170c05d101b3b397d8ad2fbe7dbe85 to your computer and use it in GitHub Desktop.
View to show when a postgres table was last vacuumed.
CREATE VIEW inf_vacuum AS
SELECT
schemaname, relname,
last_vacuum, last_autovacuum,
vacuum_count, autovacuum_count FROM pg_stat_user_tables;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment