On 11/24/15 7:02 PM, Amit Langote wrote:
You'd get it from pg_class.reltuples for each index. Since all index
>vacuuming is done strictly on a per-index-tuple basis, that's probably the
>most accurate way to do it anyway.
Important to remember though that the reltuples would be latest as of the
last VACUUM/ANALYZE.
True, but in cases where you care about monitoring a vacuum I suspect
it'll be close enough.
Might be worth a little extra effort to handle the 0 case though. If you
really wanted to get fancy you could see how the current heap
tuples/page count compares to reltuples/relpages from pg_class for the
heap... but I suspect that's pretty serious overkill.
--
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers