Skip to content
Snippets Groups Projects
Commit f002dc3d authored by Andrew Dunstan's avatar Andrew Dunstan
Browse files

Fix relfrozenxid query in docs to include TOAST tables.

The original query ignored TOAST tables which could result in tables
needing a vacuum not being reported.

Backpatch to all live branches.
parent 6a007fa1
No related branches found
No related tags found
No related merge requests found
......@@ -534,7 +534,12 @@
examine this information is to execute queries such as:
<programlisting>
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind IN ('r', 'm');
SELECT c.oid::regclass as table_name,
greatest(age(c.relfrozenxid),age(t.relfrozenxid)) as age
FROM pg_class c
LEFT JOIN pg_class t ON c.reltoastrelid = t.oid
WHERE c.relkind IN ('r', 'm');
SELECT datname, age(datfrozenxid) FROM pg_database;
</programlisting>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment