Ignore 2PC transaction GIDs in query jumbling

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-08-01T00:38:14Z
Lists: pgsql-hackers

Attachments

Hi all,

31de7e6 has silenced savepoint names in the query jumbling, and
something similar can be done for 2PC transactions once the GID is
ignored in TransactionStmt.  This leads to the following grouping in
pg_stat_statements, for instance, which is something that matters with
workloads that heavily rely on 2PC:
COMMIT PREPARED $1
PREPARE TRANSACTION $1
ROLLBACK PREPARED $1

Thoughts or comments?
--
Michael

Commits

  1. Show names of DEALLOCATE as constants in pg_stat_statements

  2. Show GIDs of two-phase commit commands as constants in pg_stat_statements