public inbox for [email protected]
help / color / mirror / Atom feedFrom: shveta malik <[email protected]>
To: Peter Smith <[email protected]>
Cc: Bertrand Drouvot <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Masahiko Sawada <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Dilip Kumar <[email protected]>
Cc: Nisha Moond <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: Bruce Momjian <[email protected]>
Cc: Ashutosh Sharma <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Ajin Cherian <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: shveta malik <[email protected]>
Subject: Re: Synchronizing slots from primary to standby
Date: Thu, 25 Jan 2024 17:17:14 +0530
Message-ID: <CAJpy0uCat2ifvr=hJHcCTp1UU3J6Fo_HAdH8hFomqOA8o7zVFA@mail.gmail.com> (raw)
In-Reply-To: <CAHut+PtsDYPbg7qM1nGWtJcSQBQ5JH=LmgyqwqBPL9k+z8f5Ew@mail.gmail.com>
References: <CAJpy0uCJ7MKgZnKLAACd-AXN0VbWM5gVJ+GRJ1Za_A2UmF3R0A@mail.gmail.com>
<[email protected]>
<CAJpy0uBc6H22RbNVU213AZ_BPw+uDptcTVHakKegpTCv74yN=w@mail.gmail.com>
<CAD21AoBgzONdt3o5mzbQ4MtqAE=WseiXUOq0LMqne-nWGjZBsA@mail.gmail.com>
<CAJpy0uDfgZcJxTcmnRoiL8zNfRht-iMGb51_CyGJ6ybxjT4H2w@mail.gmail.com>
<CAA4eK1Jhy1-bsu6vc0=Nja7aw5-EK_=101pnnuM3ATqTA8+=Sg@mail.gmail.com>
<CAD21AoApGoTZu7D_7=bVYQqKnj+PZ2Rz+nc8Ky1HPQMS_XL6+A@mail.gmail.com>
<CAA4eK1LMfoDbo4CfoW9tMDWYRZwQ+paF_wrD9=WiXJR3mkm7Pg@mail.gmail.com>
<CAD21AoBy+6ygad-hBZ=vB86infK4RQhBwPHByNrtB0GCSM7T+Q@mail.gmail.com>
<CAA4eK1L8Oh2grbT=MyS+mow2LUEF_7Z-idjsyK50Rh24yRujyA@mail.gmail.com>
<[email protected]>
<CAJpy0uD2B+S5+r_G7TZ-Z=Dh==8RF3X1_T8ofYf0n=et0ZXtXA@mail.gmail.com>
<CAJpy0uALV+-dHZohApDPpcEXCdNhF9PFbT5BNr4WLGXZ-qHaOg@mail.gmail.com>
<CAHut+PtsDYPbg7qM1nGWtJcSQBQ5JH=LmgyqwqBPL9k+z8f5Ew@mail.gmail.com>
On Thu, Jan 25, 2024 at 10:39 AM Peter Smith <[email protected]> wrote:
> 2. synchronize_one_slot
>
> + /*
> + * Sanity check: Make sure that concerned WAL is received and flushed
> + * before syncing slot to target lsn received from the primary server.
> + *
> + * This check should never pass as on the primary server, we have waited
> + * for the standby's confirmation before updating the logical slot.
> + */
> + latestFlushPtr = GetStandbyFlushRecPtr(NULL);
> + if (remote_slot->confirmed_lsn > latestFlushPtr)
> + {
> + ereport(LOG,
> + errmsg("skipping slot synchronization as the received slot sync"
> + " LSN %X/%X for slot \"%s\" is ahead of the standby position %X/%X",
> + LSN_FORMAT_ARGS(remote_slot->confirmed_lsn),
> + remote_slot->name,
> + LSN_FORMAT_ARGS(latestFlushPtr)));
> +
> + return false;
> + }
>
> Previously in v65 this was an elog, but now it is an ereport. But
> since this is a sanity check condition that "should never pass" wasn't
> the elog the more appropriate choice?
We realized that this scenario can be frequently hit when the user has
not set standby_slot_names on primary. And thus ereport makes more
sense. But I agree that this comment is misleading. We will adjust the
comment in the next version.
thanks
Shveta
view thread (119+ messages) latest in thread
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: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Synchronizing slots from primary to standby
In-Reply-To: <CAJpy0uCat2ifvr=hJHcCTp1UU3J6Fo_HAdH8hFomqOA8o7zVFA@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox