Re: Ignore 2PC transaction GIDs in query jumbling - Mailing list pgsql-hackers

From Julien Rouhaud
Subject Re: Ignore 2PC transaction GIDs in query jumbling
Date
Msg-id 20230801012808.px3pbet4qk7l3bwk@jrouhaud
Whole thread Raw
In response to Ignore 2PC transaction GIDs in query jumbling  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Ignore 2PC transaction GIDs in query jumbling
List pgsql-hackers
Hi,

On Tue, Aug 01, 2023 at 09:38:14AM +0900, Michael Paquier wrote:
>
> 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

Having an application relying on 2pc leads to pg_stat_statements being
virtually unusable on the whole instance, so +1 for the patch.

FTR we had to entirely ignore all those statements in powa years ago to try to
make the tool usable in such case for some users who where using 2pc, it would
be nice to be able to track them back for pg16+.

The patch LGTM.



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Performance degradation on concurrent COPY into a single relation in PG16.
Next
From: Peter Smith
Date:
Subject: Simplify some logical replication worker type checking