public inbox for [email protected]
help / color / mirror / Atom feedFrom: Drouvot, Bertrand <[email protected]>
To: Zhijie Hou (Fujitsu) <[email protected]>
To: Amit Kapila <[email protected]>
To: shveta malik <[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: Tue, 28 Nov 2023 09:47:24 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <OS0PR01MB571646BD1D0198060112A4F994A6A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
References: <CAJpy0uC+2agRtF3H=n-hW5JkoPfaZkjPXJr==y3_PRE04dQvhw@mail.gmail.com>
<CAJpy0uD6c3SB+UBG7ULTDydb=xUDfG4EAa6jkwaCVTZFxwrN+w@mail.gmail.com>
<CAHut+PuP_Hw5WTYCBBKUMRu6M47y1tzB-N469pqxejfh0jTu5Q@mail.gmail.com>
<CAJpy0uBQB32g0Mcf2yo+cscUF_8L_QEOH-ZwVgeV3eWmn7603A@mail.gmail.com>
<CAA4eK1J6BqO5=ueFAQO+aYyHLaU-oCHrrVFJqHS-i0Ce9aPY2w@mail.gmail.com>
<CAJpy0uAb7j2ZNVnm_Mvt+ofCvK1Wh17-d-Jm5ZCq=6V0k327xA@mail.gmail.com>
<[email protected]>
<CAJpy0uCMptLCgg-fWWTEcgtRfXAeObaXLUw=i2L4vhPRVXGJMA@mail.gmail.com>
<[email protected]>
<CAJpy0uCQQb=UK3h5RWO4_r_MVuLKEGZ34hYrqGmDm+3zVvcJgQ@mail.gmail.com>
<[email protected]>
<CAJpy0uC0xa3_uOxeYd29sbnYbLoJjEOsHGotgPqmYzBk3b6=4A@mail.gmail.com>
<CAJpy0uDv01ctC3z7fV3cbvVw8o+micn7zkD+VBxFm4TnsQh3OQ@mail.gmail.com>
<CAA4eK1KDJ5ctcn+JTKmcCRsxQ2cWZD-uy7zv+cXCwXv=P95yyQ@mail.gmail.com>
<OS0PR01MB571646BD1D0198060112A4F994A6A@OS0PR01MB5716.jpnprd01.prod.outlook.com>
Hi,
On 11/2/23 1:27 AM, Zhijie Hou (Fujitsu) wrote:
> On Tuesday, October 31, 2023 6:45 PM Amit Kapila <[email protected]> wrote:
>> We have create_replication_slot and drop_replication_slot in repl_gram.y. How
>> about if introduce alter_replication_slot and handle the 'failover' flag with that?
>> The idea is we will either enable 'failover' at the time create_replication_slot by
>> providing an optional failover option or execute a separate command
>> alter_replication_slot. I think we probably need to perform this command
>> before the start of streaming.
>
> Here is an attempt to achieve the same. I added a new replication command
> alter_replication_slot and introduced a walreceiver api walrcv_alter_slot to
> execute the command. The subscription will call the api to enable/disable
> the failover of the slot on publisher.
>
> The patch disallows altering the failover option for the subscription. But we
> could release the restriction by using the following approaches in next version:
>
>> I think we will have the following options to allow alter of the 'failover'
>> property: (a) we can allow altering 'failover' only for the 'disabled'
>> subscription; to achieve that, we need to open a connection during alter
>> subscription and change this property of slot; (b) apply worker detects the
>> change in 'failover' option; run the alter_replication_slot command; this needs
>> more analysis as apply_worker is already doing streaming and changing slot
>> property in between could be tricky.
>
What do you think about also adding a pg_alter_logical_replication_slot() or such
function?
That would allow users to alter manually created logical replication slots without
the need to make a replication connection.
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
view thread (69+ 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: <[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