Skip to content

Track pg_stat_database temp_files and temp_bytes#818

Open
msepga wants to merge 1 commit into
mainfrom
pg-stat-database-temp-files
Open

Track pg_stat_database temp_files and temp_bytes#818
msepga wants to merge 1 commit into
mainfrom
pg-stat-database-temp-files

Conversation

@msepga

@msepga msepga commented May 15, 2026

Copy link
Copy Markdown
Contributor

We collect temp_files and temp_bytes from pg_stat_database as diffed counters, providing server-wide spill data to complement per-query temp_blks from pg_stat_statements.

We collect temp_files and temp_bytes from pg_stat_database as
diffed counters, providing server-wide spill data to complement
per-query temp_blks from pg_stat_statements.
int32 xact_rollback = 5; // Number of transactions in this database that have been rolled back
int64 untracked_cache_bytes = 6; // Size of Postgres buffer cache not associated with tables tracked by the collector
int32 temp_files = 7; // Number of temporary files created by queries in this database (diff)
int64 temp_bytes = 8; // Total data written to temporary files by queries in this database (diff)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd drop the (diff) part of the comment since I think that's clear from the overall context (and other fields don't have it).

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

Successfully merging this pull request may close these issues.

2 participants