Show GIDs of two-phase commit commands as constants in pg_stat_statements
Michael Paquier <michael@paquier.xyz>
Show GIDs of two-phase commit commands as constants in pg_stat_statements This relies on the "location" field added to TransactionStmt in 31de7e6, now applied to the "gid" field used by 2PC commands. These commands are now reported like: COMMIT PREPARED $1 PREPARE TRANSACTION $1 ROLLBACK PREPARED $1 Applying constants for these commands is a huge advantage for workloads that rely a lot on 2PC commands with different GIDs. Some tests are added to track the new behavior. Reviewed-by: Julien Rouhaud Discussion: https://postgr.es/m/ZMhT9kNtJJsHw6jK@paquier.xyz
Files
| Path | Change | +/− |
|---|---|---|
| contrib/pg_stat_statements/expected/utility.out | modified | +23 −0 |
| contrib/pg_stat_statements/pg_stat_statements.conf | modified | +1 −0 |
| contrib/pg_stat_statements/sql/utility.sql | modified | +10 −0 |
| src/backend/parser/gram.y | modified | +3 −3 |
| src/include/nodes/parsenodes.h | modified | +2 −1 |
Discussion
- Ignore 2PC transaction GIDs in query jumbling 15 messages · 2023-08-01 → 2023-08-27