public inbox for [email protected]
help / color / mirror / Atom feedFrom: Drouvot, Bertrand <[email protected]>
To: shveta malik <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Nisha Moond <[email protected]>
Cc: Zhijie Hou (Fujitsu) <[email protected]>
Cc: Peter Smith <[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]>
Subject: Re: Synchronizing slots from primary to standby
Date: Thu, 7 Dec 2023 10:27:18 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAJpy0uBa7XHiEW_-J+0CWnFnB9EbUG6MKeSTHPaCvSX2L_su5A@mail.gmail.com>
References: <CAJpy0uC+2agRtF3H=n-hW5JkoPfaZkjPXJr==y3_PRE04dQvhw@mail.gmail.com>
<[email protected]>
<CAA4eK1LxGd8GACR36KdtbVaQeKsV9B5-LuBf2o721x6OZ=_wWg@mail.gmail.com>
<[email protected]>
<CABdArM5zvpFcOF=_0W-E5bjqjrC2MK+EtFN0UfP43zvaFOc8QA@mail.gmail.com>
<CAJpy0uCBHRX-GSKCeVza44kFEC=uTMD_6uzuXXnbUX32Vt-g8Q@mail.gmail.com>
<[email protected]>
<CAJpy0uDiffV66DofhxZr97Sw2U_-ZkdNCjdRt9tKhnf-CxW57Q@mail.gmail.com>
<CAA4eK1+AumKenLjtVW2y4CpxBr_bo_AVZ67RWdDeJFt+Kgrj0A@mail.gmail.com>
<[email protected]>
<CAA4eK1+EeUUT+gnzoHKWm7GqosA2ehT8QyoKtu1jiyGE=wUErw@mail.gmail.com>
<CAJpy0uCAzkua8KAQaLNnYKOJ56x3yJ9kRfDxL8Enp5Li8bzhdQ@mail.gmail.com>
<[email protected]>
<CAJpy0uDU-qaspyU7nNduoqLGjeUT1jVbRyvKMTUvQNp3eY+08Q@mail.gmail.com>
<[email protected]>
<CAJpy0uBa7XHiEW_-J+0CWnFnB9EbUG6MKeSTHPaCvSX2L_su5A@mail.gmail.com>
Hi,
On 12/7/23 10:07 AM, shveta malik wrote:
> On Thu, Dec 7, 2023 at 1:19 PM Drouvot, Bertrand
> <[email protected]> wrote:
>> Might be worth to add comments in the code (around the WalRcv->latestWalEnd
>> checks) that no "lagging" sync are possible if the walreceiver is not started
>> though?
>>
>
> I am a bit confused. Do you mean as a TODO item? Otherwise the comment
> will be opposite of the code we are writing.
Sorry for the confusion: what I meant to say is that
synchronization (should it be lagging) is not possible if the walreceiver is not started
(as XLogRecPtrIsInvalid(WalRcv->latestWalEnd) would be true).
More precisely here (in synchronize_slots()):
/* The primary_slot_name is not set yet or WALs not received yet */
SpinLockAcquire(&WalRcv->mutex);
if (!WalRcv ||
(WalRcv->slotname[0] == '\0') ||
XLogRecPtrIsInvalid(WalRcv->latestWalEnd))
{
SpinLockRelease(&WalRcv->mutex);
return naptime;
}
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (108+ 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]
Subject: Re: Synchronizing slots from primary to standby
In-Reply-To: <[email protected]>
* 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