public inbox for [email protected]
help / color / mirror / Atom feedFrom: Takamichi Osumi (Fujitsu) <[email protected]>
To: 'vignesh C' <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: Melih Mutlu <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Marcos Pegoraro <[email protected]>
Cc: pgsql-hackers <[email protected]>
Cc: Peter Smith <[email protected]>
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)
Date: Thu, 24 Nov 2022 15:21:58 +0000
Message-ID: <TYCPR01MB837393BA666815647F35DDF8ED0F9@TYCPR01MB8373.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CALDaNm1vT8qNBqHivtAgYur-5-YkwF026VHtw9srd4fsdeaufA@mail.gmail.com>
References: <CAB-JLwYOYwL=XTyAXKiH5CtM_Vm8KjKh7aaitCKvmCh4rzr5pQ@mail.gmail.com>
<CAA4eK1JW+_Pff3TOaBqbOqn-LbMT2kj2bpw-a88ZSTdbTZ-aMg@mail.gmail.com>
<CAB-JLwas_=FGr8bXKD7K6g0=RDUFuYU71TLLGTsQ-DTRNpq1QQ@mail.gmail.com>
<CAA4eK1KSBGrLKR63iS38Bkvjq6fBCWzbuD6R15kEWdmd8aj3mw@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<CAGPVpCQgE1e0JQFHbxSpfj82HQfAqGmhG=yru3mX2tcmbfqHYA@mail.gmail.com>
<[email protected]>
<TYWPR01MB83628B9AE512989DCEC67F3FED659@TYWPR01MB8362.jpnprd01.prod.outlook.com>
<[email protected]>
<CALDaNm0aZeUb7LmdSc9aKkNDNdhabWEakB5bOT3bogrFAaO+_Q@mail.gmail.com>
<CAA4eK1J6xLUJNR1tXEidnpWFkX8afF40MCT4x7vgojKXBtwZMg@mail.gmail.com>
<CALDaNm1vT8qNBqHivtAgYur-5-YkwF026VHtw9srd4fsdeaufA@mail.gmail.com>
Hi,
On Tuesday, November 22, 2022 6:15 PM vignesh C <[email protected]> wrote:
> On Mon, 14 Nov 2022 at 12:14, Amit Kapila <[email protected]> wrote:
> >
> > Hi,
> >
> > The thread title doesn't really convey the topic under discussion, so
> > changed it. IIRC, this has been mentioned by others as well in the
> > thread.
> >
> > On Sat, Nov 12, 2022 at 7:21 PM vignesh C <[email protected]> wrote:
> > >
> > > Few comments:
> > > 1) I feel if the user has specified a long delay there is a chance
> > > that replication may not continue if the replication slot falls
> > > behind the current LSN by more than max_slot_wal_keep_size. I feel
> > > we should add this reference in the documentation of min_apply_delay
> > > as the replication will not continue in this case.
> > >
> >
> > This makes sense to me.
Modified accordingly. The updated patch is in [1].
> >
> > > 2) I also noticed that if we have to shut down the publisher server
> > > with a long min_apply_delay configuration, the publisher server
> > > cannot be stopped as the walsender waits for the data to be
> > > replicated. Is this behavior ok for the server to wait in this case?
> > > If this behavior is ok, we could add a log message as it is not very
> > > evident from the log files why the server could not be shut down.
> > >
> >
> > I think for this case, the behavior should be the same as for physical
> > replication. Can you please check what is behavior for the case you
> > are worried about in physical replication? Note, we already have a
> > similar parameter for recovery_min_apply_delay for physical
> > replication.
>
> In the case of physical replication by setting recovery_min_apply_delay, I
> noticed that both primary and standby nodes were getting stopped successfully
> immediately after the stop server command. In case of logical replication, stop
> server fails:
> pg_ctl -D publisher -l publisher.log stop -c waiting for server to shut
> down...............................................................
> failed
> pg_ctl: server does not shut down
>
> In case of logical replication, the server does not get stopped because the
> walsender process is not able to exit:
> ps ux | grep walsender
> vignesh 1950789 75.3 0.0 8695216 22284 ? Rs 11:51 1:08
> postgres: walsender vignesh [local] START_REPLICATION
Thanks, I could reproduce this and I'll update this point in a subsequent version.
[1] - https://www.postgresql.org/message-id/TYCPR01MB8373775ECC6972289AF8CB30ED0F9%40TYCPR01MB8373.jpnprd0...
Best Regards,
Takamichi Osumi
view thread (93+ 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]
Subject: RE: Time delayed LR (WAS Re: logical replication restrictions)
In-Reply-To: <TYCPR01MB837393BA666815647F35DDF8ED0F9@TYCPR01MB8373.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