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

Postgres: Add postgres.snapshot.{xmin,xmax,xip_count} metric #13777

Merged
merged 4 commits into from
Jun 6, 2023

Conversation

bonnefoa
Copy link
Contributor

@bonnefoa bonnefoa commented Jan 24, 2023

What does this PR do?

Report the global txid extracted from pg_snapshot_xmax(pg_current_snapshot()).

Motivation

This will provide a way to see the rate of txid consumption.

The current postgresql.commits only provides visibility on commits
which include both virtual and non-virtual transactions.
postgres.snapshot.xmax only reports transactions that were
assigned txid when they doing changes in the database.

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.

@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #13777 (6110354) into master (04a641e) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Flag Coverage Δ
postgres 91.04% <100.00%> (+0.02%) ⬆️

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

iliakur
iliakur previously approved these changes Apr 6, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

Test Results

     12 files       12 suites   11m 47s ⏱️
   195 tests    193 ✔️   2 💤 0
1 176 runs  1 140 ✔️ 36 💤 0

Results for commit 6110354.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Apr 7, 2023

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@bonnefoa bonnefoa changed the title Postgres: Add postgres.transactions.xid metric to report global txid Postgres: Add postgres.snapshot.{xmin,xmax,xip_count} metric Apr 11, 2023
@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

2 similar comments
@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@github-actions
Copy link

The validations job has failed; please review the Files changed tab for possible suggestions to resolve.

@bonnefoa bonnefoa force-pushed the bonnefoa/pg-snapshot-xmin branch 5 times, most recently from 3cc3481 to 73dcd45 Compare April 27, 2023 08:11
iliakur
iliakur previously approved these changes Apr 27, 2023
@bonnefoa bonnefoa force-pushed the bonnefoa/pg-snapshot-xmin branch 3 times, most recently from bba5a7c to 9455cee Compare April 28, 2023 14:00
iliakur
iliakur previously approved these changes May 2, 2023
@bonnefoa bonnefoa force-pushed the bonnefoa/pg-snapshot-xmin branch from 9455cee to b30fd27 Compare May 2, 2023 15:08
@alexandre-normand
Copy link
Contributor

Looks like the rebase from master solved the tests being super slow and timing out. Merging this. And thank you, @bonnefoa ! 🙇

@alexandre-normand alexandre-normand merged commit 4b31386 into master Jun 6, 2023
@alexandre-normand alexandre-normand deleted the bonnefoa/pg-snapshot-xmin branch June 6, 2023 20:07
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.

3 participants