Add single-item cache when looking at topmost XID of a subtrans XID
Michael Paquier <michael@paquier.xyz>
Add single-item cache when looking at topmost XID of a subtrans XID This change affects SubTransGetTopmostTransaction(), used to find the topmost transaction ID of a given transaction ID. The cache is able to store one value, so as we can save the backend from unnecessary lookups at pg_subtrans/ on repetitive calls of this routine. There is a similar practice in transam.c, for example. Author: Simon Riggs Reviewed-by: Andrey Borodin, Julien Rouhaud Discussion: https://postgr.es/m/CANbhV-G8Co=yq4v4BkW7MJDqVt68K_8A48nAZ_+8UQS7LrwLEQ@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/subtrans.c | modified | +18 −0 |
Discussion
- suboverflowed subtransactions concurrency performance optimize 30 messages · 2021-08-30 → 2022-05-28