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

Extract relation metrics for toast tables #14156

Closed
wants to merge 6 commits into from
Closed

Conversation

bonnefoa
Copy link
Contributor

What does this PR do?

We currently only pull relation metrics from pg_stat_user_tables and pg_stat_user_indexes. However, those tables don't include toast tables so we're missing metrics on toast tables.

Motivation

Since data bigger than 2KB will be split in chunk of 2KB and moved in the toast table, an update of a table with toast data can generate hundred of tuple updates behind the hood that will not appear on the user table's stats.
We need to fetch them explicitly to get relations metrics like number of live rows/dead rows in the toast table and number of returned rows.

Additional Notes

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • PR title must be written as a CHANGELOG entry (see why)
  • Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
  • PR must have changelog/ and integration/ labels attached
  • If the PR doesn't need to be tested during QA, please add a qa/skip-qa label.

@bonnefoa bonnefoa requested review from a team as code owners March 14, 2023 14:02
@ghost ghost added the integration/postgres label Mar 14, 2023
@codecov
Copy link

codecov bot commented Mar 14, 2023

Codecov Report

Merging #14156 (abf1991) into master (4b4ff18) will increase coverage by 0.01%.
Report is 1743 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
Flag Coverage Δ
postgres 92.05% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@FlorentClarret
Copy link
Member

Hey @bonnefoa 👋 Just a heads up that we will freeze the repo on Friday for Agent 7.47. Let us know if you want to include this in the next release!

@bonnefoa
Copy link
Contributor Author

bonnefoa commented Jul 5, 2023

I need to rework this PR, it won't be ready for the next freeze. Thanks for the headsup :)

@FlorentClarret
Copy link
Member

Hey @bonnefoa, very friendly reminder this PR is still pending. Let us know if you need a hand

@bonnefoa bonnefoa marked this pull request as draft November 22, 2023 09:30
@FlorentClarret
Copy link
Member

Closing this PR since it's still a draft, feel free to re-open it if needed 🙂

@dd-devflow dd-devflow bot deleted the bonnefoa/toast-tables branch February 7, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants