pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix unstable test in 040_pg_createsubscriber.
Date: Fri, 12 Jul 2024 04:34:28 +0000
Message-ID: <E1sS7zI-001Knm-Be@gemulon.postgresql.org> (raw)

Fix unstable test in 040_pg_createsubscriber.

The slot synchronization failed because the local slot's (created during
slot synchronization) catalog_xmin on standby is ahead of remote slot.
This happens because the INSERT before slot synchronization results in the
generation of a new xid that could be replicated to the standby. Now
before the xmin of the physical slot on the primary catches up via
hot_standby_feedback, the test has created a logical slot that got some
prior value of catalog_xmin.

To fix this we could try to ensure that the physical slot's catalog_xmin
is caught up to latest value before creating a logical slot but we took a
simpler path to move the INSERT after synchronizing the logical slot.

Reported-by: Alexander Lakhin as per buildfarm
Diagnosed-by: Amit Kapila, Hou Zhijie, Alexander Lakhin
Author: Hou Zhijie
Backpatch-through: 17
Discussion: https://postgr.es/m/bde6ac67-69cc-c104-5ab6-dd4f5deadf24@gmail.com

Branch
------
REL_17_STABLE

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

Modified Files
--------------
src/bin/pg_basebackup/t/040_pg_createsubscriber.pl | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)



view thread (2+ messages)

Message-ID: <E1sS7zI-001Knm-Be@gemulon.postgresql.org>
Permalink:  ../E1sS7zI-001Knm-Be@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1sS7zI-001Knm-Be@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix unstable test in 040_pg_createsubscriber.
  In-Reply-To: <E1sS7zI-001Knm-Be@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox