pgsql: pg_logicalinspect: Stabilize isolation tests.

From: Masahiko Sawada <msawada(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: pg_logicalinspect: Stabilize isolation tests.
Date: 2025-03-11 16:30:14
Message-ID: E1ts2Ug-001xJE-04@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

pg_logicalinspect: Stabilize isolation tests.

The previous isolation tests did not account for the possibility that
the background writer or the checkpointer could write a RUNNING_XACTS
record, which could cause logical decoding to produce more logical
snapshots than expected.

This commit modifies the isolation tests to verify that at least one
logical snapshot contains the expected number of committed or ongoing
catalog-change transactions.

Per buildfarm member skink.

Reported-by: Andres Freund <andres(at)anarazel(dot)de>
Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Reviewed-by: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Discussion: https://postgr.es/m/5qbxud4pvnvmtuoi7weiizm5hmumxaeohx4vztfhrwlfhyz6rj@buh4435mllwo

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/a49927f04cd0c66e1bc41f551160fce50f382d8c

Modified Files
--------------
.../pg_logicalinspect/expected/logical_inspect.out | 44 ++++++----------------
.../pg_logicalinspect/specs/logical_inspect.spec | 24 +++++++++---
2 files changed, 30 insertions(+), 38 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Masahiko Sawada 2025-03-11 16:57:06 pgsql: pg_logicalinspect: Fix possible crash when passing a directory p
Previous Message Tom Lane 2025-03-11 15:20:01 pgsql: Improve EXPLAIN's display of window functions.