From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Michael Paquier <michael(at)paquier(dot)xyz>, "Drouvot, Bertrand" <bertranddrouvot(dot)pg(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Subject: | Re: Function to get invalidation cause of a replication slot. |
Date: | 2023-12-27 09:44:51 |
Message-ID: | CAJpy0uDSuo37MWhVN-A-2VneWtMK=X5E922ZSdC+Ua9PDeKP2Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Dec 21, 2023 at 2:59 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> On Thu, Dec 21, 2023 at 12:07 PM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> >
> > On Thu, Dec 21, 2023 at 11:53:04AM +0530, Amit Kapila wrote:
> > > On Thu, Dec 21, 2023 at 11:18 AM Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> > > Yeah, if one uses them independently then there is no such guarantee.
> >
> > This could be possible in the same query as well, still less likely,
> > as the contents are volatile.
> >
>
> True, this is quite obvious but that was not a recommended way to use
> the function. Anyway, now that we agree to expose it via an existing
> function, there is no point in further argument on this.
>
> > >> A lot could happen between both function calls while the
> > >> repslot LWLock is not hold.
> > >>
> > >> Yeah, you could keep the reason text as NULL when there is no
> > >> conflict, replacing the boolean by the text in the function, and keep
> > >> the view definition compatible with v16 while adding an extra column.
> > >
> > > But as mentioned we also want the enum value to be exposed in some way
> > > so that it can be used by the sync slot feature [1] as well,
> > > otherwise, we may need some mappings to convert the text back to an
> > > enum. I guess if we want to expose via view, then we can return an
> > > enum value by pg_get_replication_slots() and the view can replace it
> > > with text based on the value.
> >
> > Sure. Something like is OK by me as long as the data is retrieved
> > from a single scan of the slot data while holding the slot data's
> > LWLock.
> >
>
> Okay, so let's go this way unless someone feels otherwise.
Please track the progress in another thread [1] where the patch is posted today.
[1]: https://www.postgresql.org/message-id/ZYOE8IguqTbp-seF%40paquier.xyz
thanks
Shveta
From | Date | Subject | |
---|---|---|---|
Next Message | shveta malik | 2023-12-27 10:13:44 | Re: Synchronizing slots from primary to standby |
Previous Message | Vitalijus Jefišovas | 2023-12-27 09:44:29 | PostgreSQL 16.1 dict_snowball.so: undefined symbol: CurrentMemoryContext |