Re: Synchronizing slots from primary to standby - Mailing list pgsql-hackers

From Drouvot, Bertrand
Subject Re: Synchronizing slots from primary to standby
Date
Msg-id 2b2c42cc-51f0-445f-aa7a-361b5db8522d@gmail.com
Whole thread Raw
In response to Re: Synchronizing slots from primary to standby  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Synchronizing slots from primary to standby
List pgsql-hackers
Hi,

On 11/8/23 9:57 AM, Amit Kapila wrote:
> On Wed, Nov 8, 2023 at 12:32 PM Drouvot, Bertrand
> <bertranddrouvot.pg@gmail.com> wrote:
>>
>> Hi,
>>
>> On 11/8/23 4:50 AM, Amit Kapila wrote:
>>
>>> I think if we want to follow
>>> this approach then we need to also monitor these slots for any change
>>> in the consecutive cycles and if we are able to sync them then
>>> accordingly we enable them to use after failover.
>>
>> What about to add a new field in ReplicationSlotPersistentData
>> indicating that we are waiting for "sync" and drop such slots during promotion and
>> /or if not in recovery?
>>
> 
> This patch is already adding 'synced' flag in
> ReplicationSlotPersistentData to distinguish synced slots so that we
> can disallow decoding on then in standby and disallow to drop those. I
> suggest we change that field to have multiple states where one of the
> states would indicate that the initial sync of the slot is done.
> 

Yeah, agree.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: "Andrey M. Borodin"
Date:
Subject: Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock
Next
From: Dave Cramer
Date:
Subject: Re: Protocol question regarding Portal vs Cursor