Make two-phase tests of ECPG and main suite more concurrent-proof The ECPG and main 2PC tests have been using rather-generic names for the prepared transactions they generate. This commit switches the 2PC transactions to use more complex GIDs, reducing the risk of naming conflicts.
The main 2PC tests also include scans of pg_prepared_xacts that do not apply filters on the GID of the prepared transactions, making it possible to fail the test when any 2PC transaction runs concurrently. The CI has been able to see such failures with an installcheck running the ECPG and the main regression test suites in parallel. The queries on pg_prepared_xacts gain quals to only look after the GIDs generated locally. The race is very hard to reproduce, so no backbatch is done for now. Reported-by: Richard Guo Discussion: https://postgr.es/m/CAMbWs4-mWCGbbE_bne5=afqjygdauzmjcw2+soljrdna0xu...@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/7e61e4cc7cfcf2a34f063094aeab01fdba7b65f6 Modified Files -------------- src/interfaces/ecpg/test/expected/sql-twophase.c | 4 +- .../ecpg/test/expected/sql-twophase.stderr | 4 +- src/interfaces/ecpg/test/sql/twophase.pgc | 4 +- src/test/regress/expected/prepared_xacts.out | 98 +++++++++++----------- src/test/regress/expected/prepared_xacts_1.out | 62 +++++++------- src/test/regress/sql/prepared_xacts.sql | 50 +++++------ 6 files changed, 111 insertions(+), 111 deletions(-)