Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add xid exhaustion data to statistics gathered #30

Open
keithf4 opened this issue Feb 23, 2023 · 0 comments
Open

Add xid exhaustion data to statistics gathered #30

keithf4 opened this issue Feb 23, 2023 · 0 comments

Comments

@keithf4
Copy link
Owner

keithf4 commented Feb 23, 2023

Since bloat/xid can often be related since bloated tables aren't getting vacuumed as they should, see about adding xid age stats to the data involved.

Databases w/ oldest txid's

SELECT datname, age(datfrozenxid), current_setting('autovacuum_freeze_max_age') FROM pg_database ORDER BY 2 DESC;

Top tables with oldest txid

select oid::regclass, age(relfrozenxid), pg_size_pretty(pg_total_relation_size(oid)) from pg_class where relkind in ('r', 't', 'm', 'p') order by 2 desc limit 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant