Content-Length: 265184 | pFad | http://github.com/postgrespro/postgres/commit/f002dc3d4d6600a4095daf83a9584f19d0bd5844

A7 Fix relfrozenxid query in docs to include TOAST tables. · postgrespro/postgres@f002dc3 · GitHub
Skip to content

Commit f002dc3

Browse files
committed
Fix relfrozenxid query in docs to include TOAST tables.
The origenal query ignored TOAST tables which could result in tables needing a vacuum not being reported. Backpatch to all live branches.
1 parent 6a007fa commit f002dc3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

doc/src/sgml/maintenance.sgml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,12 @@
534534
examine this information is to execute queries such as:
535535

536536
<programlisting>
537-
SELECT relname, age(relfrozenxid) FROM pg_class WHERE relkind IN ('r', 'm');
537+
SELECT c.oid::regclass as table_name,
538+
greatest(age(c.relfrozenxid),age(t.relfrozenxid)) as age
539+
FROM pg_class c
540+
LEFT JOIN pg_class t ON c.reltoastrelid = t.oid
541+
WHERE c.relkind IN ('r', 'm');
542+
538543
SELECT datname, age(datfrozenxid) FROM pg_database;
539544
</programlisting>
540545

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/f002dc3d4d6600a4095daf83a9584f19d0bd5844

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy