Re: persist logical slots to disk during shutdown checkpoint - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: persist logical slots to disk during shutdown checkpoint
Date
Msg-id CAA4eK1+-WfKjyrDzXWkiUqfDiS4KDRkO2VELKLSQxxhj0Qg74g@mail.gmail.com
Whole thread Raw
In response to Re: persist logical slots to disk during shutdown checkpoint  (Julien Rouhaud <rjuju123@gmail.com>)
List pgsql-hackers
On Wed, Aug 30, 2023 at 9:03 AM Julien Rouhaud <rjuju123@gmail.com> wrote:
>
> On Tue, Aug 29, 2023 at 02:21:15PM +0530, Amit Kapila wrote:
> > On Tue, Aug 29, 2023 at 10:16 AM vignesh C <vignesh21@gmail.com> wrote:
> > >
> > > That makes sense. The attached v6 version has the changes for the
> > > same, apart from this I have also fixed a) pgindent issues b) perltidy
> > > issues c) one variable change (flush_lsn_changed to
> > > confirmed_flush_has_changed) d) corrected few comments in the test
> > > file. Thanks to Peter for providing few offline comments.
> > >
> >
> > The latest version looks good to me. Julien, Ashutosh, and others,
> > unless you have more comments or suggestions, I would like to push
> > this in a day or two.
>
> Unfortunately I'm currently swamped with some internal escalations so I
> couldn't keep up closely with the latest activity here.
>
> I think I recall that you wanted to
> change the timing at which logical slots are shutdown, I'm assuming that this
> change won't lead to always have a difference between the LSN and latest
> persisted LSN being different?
>

I think here by LSN you are referring to confirmed_flush LSN. If so,
this doesn't create any new difference between the values for the
confirmed_flush LSN in memory and in disk. We just remember the last
persisted value to avoid writes of slots at shutdown time.

>  Otherwise saving the latest persisted LSN to
> try to avoid persisting again all logical slots on shutdown seems reasonable to
> me.

Thanks for responding.

--
With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Synchronizing slots from primary to standby
Next
From: Andy Fan
Date:
Subject: Re: Extract numeric filed in JSONB more effectively