Skip to content

Record table only size bytes as well in addition to the total size bytes #1149

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

Merged
merged 4 commits into from
Apr 18, 2025

Conversation

Sticksman
Copy link
Contributor

pg_total_relation_size gets the size of the relation + indexes and toast, however we need to know just the size of the table itself. You can get this info from pg_table_size. Should be safe to add, this function was added back in 2010.

@Sticksman Sticksman force-pushed the only-table-size-bytes branch from 96099cb to 4bb84e9 Compare April 9, 2025 16:53
Sticksman and others added 3 commits April 17, 2025 14:38
@Sticksman Sticksman requested a review from SuperQ April 17, 2025 21:50
@Sticksman Sticksman force-pushed the only-table-size-bytes branch from 27388e7 to 34b93cf Compare April 17, 2025 21:50
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

@SuperQ SuperQ merged commit 5edc331 into prometheus-community:master Apr 18, 2025
11 checks passed
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