public inbox for [email protected]
help / color / mirror / Atom feedFrom: Zhijie Hou (Fujitsu) <[email protected]>
To: Zhijie Hou (Fujitsu) <[email protected]>
To: shveta malik <[email protected]>
Cc: Amit Kapila <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: Drouvot, Bertrand <[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: Fri, 1 Dec 2023 04:10:21 +0000
Message-ID: <OS0PR01MB571678BABEDBE830062CAB119481A@OS0PR01MB5716.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <OS0PR01MB57163425CEE6CEC16C7D6FA59483A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
References: <CAJpy0uC+2agRtF3H=n-hW5JkoPfaZkjPXJr==y3_PRE04dQvhw@mail.gmail.com>
<CAJpy0uAT-oGsgmb4dC=dYYRNY7WXEAAWGWU2kL5phLz3Wcdifg@mail.gmail.com>
<CAA4eK1J=-kPHS1eHNBtzOQHZ64j6WSgSYQZ3fH=2vfiwy_48AA@mail.gmail.com>
<CAJpy0uB_y_1akXUWM9WnSdQ-NVWTnHTpmNu6gJQ5tnyuAMTUOg@mail.gmail.com>
<CAHut+Pv-yu71ogj_hRi6cCtmD55bsyw7XTxj1Nq8yVFKpY3NDQ@mail.gmail.com>
<OS0PR01MB571646B8186F6A06404BD50194BDA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
<OS0PR01MB57161C27BCFAF04C2B48B47394BDA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
<[email protected]>
<CAJpy0uDKPK537ZW8CAjDVmSjHtBKCzTUzq=it84SrA0PfoWFCg@mail.gmail.com>
<OS0PR01MB57161938A348977127D56A6694BDA@OS0PR01MB5716.jpnprd01.prod.outlook.com>
<CAA4eK1+V_KQjdDzW8EivuhYNTqfNiH_zToU4yE1GYY_TKpQzRA@mail.gmail.com>
<CAJpy0uD+yYq+2F0N8hVGSjz6YwbScFGB_fME6E831Fbg0_hkMg@mail.gmail.com>
<[email protected]>
<CAJpy0uAa6HnPKCO8pM7xFfEmzXtXDmgRvX5ErJX8e8-mWyvXYQ@mail.gmail.com>
<[email protected]>
<OS0PR01MB57163425CEE6CEC16C7D6FA59483A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
On Wednesday, November 29, 2023 5:12 PM Zhijie Hou (Fujitsu) <[email protected]> wrote:
I was reviewing slotsync worker design and here
are few comments on 0002 patch:
1.
+ if (!WalRcv ||
+ (WalRcv->slotname[0] == '\0') ||
+ XLogRecPtrIsInvalid(WalRcv->latestWalEnd))
I think we'd better take spinlock when accessing these shared memory fields.
2.
/*
* The slot sync feature itself is disabled, exit.
*/
if (!enable_syncslot)
{
ereport(LOG,
errmsg("exiting slot sync worker as enable_syncslot is disabled."));
Can we check the GUC when registering the worker(SlotSyncWorkerRegister),
so that the worker won't be started if enable_syncslot is false.
3. In synchronize_one_slot, do we need to skip the slot sync and drop if the
local slot is a physical one ?
4.
*locally_invalidated =
(remote_slot->invalidated == RS_INVAL_NONE) &&
(local_slot->data.invalidated != RS_INVAL_NONE);
When reading the invalidated flag of local slot, I think we'd better take
spinlock.
Best Regards,
Hou zj
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]
Subject: RE: Synchronizing slots from primary to standby
In-Reply-To: <OS0PR01MB571678BABEDBE830062CAB119481A@OS0PR01MB5716.jpnprd01.prod.outlook.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