pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Show GIDs of two-phase commit commands as constants in pg_stat_s
Date: Sat, 12 Aug 2023 01:47:49 +0000
Message-ID: <E1qUdjI-001cmJ-N9@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/638d42a3c52081cf4882520f0622161bad69b40f

Modified Files
--------------
contrib/pg_stat_statements/expected/utility.out    | 23 ++++++++++++++++++++++
contrib/pg_stat_statements/pg_stat_statements.conf |  1 +
contrib/pg_stat_statements/sql/utility.sql         | 10 ++++++++++
src/backend/parser/gram.y                          |  6 +++---
src/include/nodes/parsenodes.h                     |  3 ++-
5 files changed, 39 insertions(+), 4 deletions(-)



Message-ID: <E1qUdjI-001cmJ-N9@gemulon.postgresql.org>
Permalink:  ../E1qUdjI-001cmJ-N9@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1qUdjI-001cmJ-N9@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Show GIDs of two-phase commit commands as constants in pg_stat_s
  In-Reply-To: <E1qUdjI-001cmJ-N9@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox