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

[YSQL] Reset Transaction ID Counter during Postmaster Startup/Shutdown #26246

Open
1 task done
karthik-ramanathan-3006 opened this issue Feb 28, 2025 · 0 comments
Open
1 task done
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage

Comments

@karthik-ramanathan-3006
Copy link
Contributor

karthik-ramanathan-3006 commented Feb 28, 2025

Jira Link: DB-15592

Description

#26205 explores an issue that can cause PostgreSQL Transaction IDs (XIDs) to get exhausted quickly.
The fix for this issue involves ensuring that at most 1 XID is used per statement/transaction.

However, an issue remains that XIDs can still get exhausted (albeit much more slowly) as YugabyteDB does not perform vacuuming of the XIDs like vanilla PostgreSQL does. This Github issue seeks to reset XIDs on Postmaster startup/shutdown so that there is a graceful way to recover from such exhaustion, without having to require manual intervention. This solution works because XIDs are node local, and are not persisted in the catalog. So, any node can choose to reset its counter without having to coordinate with other nodes in the cluster. The latest XID is instead persisted to a local file pg_control which the postmaster reads upon startup. Performing a reset at startup/shutdown would also make it easier to avoid race conditions in accessing the control file as the postmaster is guaranteed to be the only reader/writer.

Issue Type

kind/enhancement

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.
@karthik-ramanathan-3006 karthik-ramanathan-3006 added area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Feb 28, 2025
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue status/awaiting-triage Issue awaiting triage
Projects
None yet
Development

No branches or pull requests

2 participants