GP - function to report table XID age

psql -d dbname -c 
"select name as \"Postgres.conf GUC\", 
setting \"Current Setting\" 
from pg_settings 
where name='vacuum_freeze_min_age'"
psql -d dbname -c 
"select c.oid::regclass as \"Table\", 
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 = 'r' 
order by 2 desc 
limit 10"

Comments

Popular posts from this blog

How to set Optimizer at database level in greenplum

Changing the gpmon Password

IPMI Tool | IPMI Cheatsheet