| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add single-item cache when looking at topmost XID of a subtrans |
| Date: | 2022-04-07 05:35:26 |
| Message-ID: | E1ncKnl-000gio-E3@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/06f5295af673df795e8e70e28c43d61c2817b6df
Modified Files
--------------
src/backend/access/transam/subtrans.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Eisentraut | 2022-04-07 05:46:10 | pgsql: Update config.guess and config.sub |
| Previous Message | Andres Freund | 2022-04-07 04:37:02 | pgsql: pgstat: rename STATS_COLLECTOR GUC group to STATS_CUMULATIVE. |