pgsql: Stabilize 035_standby_logical_decoding.pl.

From: Amit Kapila <akapila(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Stabilize 035_standby_logical_decoding.pl.
Date: 2025-04-08 04:23:16
Message-ID: E1u20UW-003Edw-1N@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Stabilize 035_standby_logical_decoding.pl.

Some tests try to invalidate logical slots on the standby server by
running VACUUM on the primary. The problem is that xl_running_xacts was
getting generated and replayed before the VACUUM command, leading to the
advancement of the active slot's catalog_xmin. Due to this, active slots
were not getting invalidated, leading to test failures.

We fix it by skipping the generation of xl_running_xacts for the required
tests with the help of injection points. As the required interface for
injection points was not present in back branches, we fixed the failing
tests in them by disallowing the slot to become active for the required
cases (where rows_removed conflict could be generated).

Author: Hayato Kuroda <kuroda(dot)hayato(at)fujitsu(dot)com>
Reviewed-by: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reviewed-by: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Backpatch-through: 16, where it was introduced
Discussion: https://postgr.es/m/Z6oQXc8LmiTLfwLA@ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/17a165d60f734b3aa2e495d890f0c4b8324ca629

Modified Files
--------------
.../recovery/t/035_standby_logical_decoding.pl | 64 ++++++++++------------
1 file changed, 29 insertions(+), 35 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2025-04-08 05:24:38 Re: pgsql: Transfer statistics during pg_upgrade.
Previous Message Bruce Momjian 2025-04-08 01:34:07 pgsql: Fix PG 17 [NOT] NULL optimization bug for domains