public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amit Kapila <[email protected]>
To: Doruk Yilmaz <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: [email protected]
Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup
Date: Tue, 29 Jul 2025 10:43:32 +0530
Message-ID: <CAA4eK1JC6yB6q52qEZ5dLNWRUEZoO-aa_XKBZ3_mcb=V2z7zug@mail.gmail.com> (raw)
In-Reply-To: <CAMPB6wfgvWjSvKNPoJkRqaL46geRDoL++Pt_3Czc2QNAdpVQHw@mail.gmail.com>
References: <CAMPB6wfe4zLjJL8jiZV5kjjpwBM2=rTRme0UCL7Ra4L8MTVdOg@mail.gmail.com>
<[email protected]>
<CAMPB6we7+97L72Ru0=WxMDi24xMbZgr2B8Nwoo5i=r=UNuG_gQ@mail.gmail.com>
<[email protected]>
<CAA4eK1JfPPFTmz7mUk26zPH8+qH9UBpkquxw75x7Ngx_D_6XXQ@mail.gmail.com>
<CAMPB6wfgvWjSvKNPoJkRqaL46geRDoL++Pt_3Czc2QNAdpVQHw@mail.gmail.com>
On Tue, Jul 29, 2025 at 2:43 AM Doruk Yilmaz <[email protected]> wrote:
>
> On Mon, Mar 3, 2025 at 6:39 AM Amit Kapila <[email protected]> wrote:
> >
> > To use replication_origin by multiple processes, one must maintain the
> > commit order as we do internally by allowing the leader process to
> > wait for the parallel worker to finish the commit. See comments atop
> > replorigin_session_setup(). Now, we could expose the pid parameter as
> > proposed by the patch after documenting the additional requirements,
> > but I am afraid that users may directly start using the API without
> > following the commit order principle, which can lead to incorrect
> > replication. So, isn't it better to do something to avoid the misuse
> > of this feature before exposing it?
>
> Wouldn't mentioning/describing needing to follow the commit order
> principle on the documentation be enough for this?
> It is quite an advanced feature that I don't believe person intending
> to use it won't start with reading documentation first.
>
That is true but I still feel there has to be some mechanism where we
can catch and give an ERROR to the user, if it doesn't follow the
same. For example, pg_replication_origin_advance() always allows going
backwards in terms of LSN which means if one doesn't follow commit
order, it can lead to breaking the replication as after restart the
client can ask to start replication from some prior point.
>
> Is there any updates on the commit?
>
I think we are still under discussion about the requirements and
design for this API. Can you tell us the use case? Did you also intend
to use it for parallel apply, if so, can you also tell at a high
level, how you are planning to manage origin? It will help us to
extend the API(s) in a meaningful way.
--
With Regards,
Amit Kapila.
view thread (46+ 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]
Subject: Re: [Patch] add new parameter to pg_replication_origin_session_setup
In-Reply-To: <CAA4eK1JC6yB6q52qEZ5dLNWRUEZoO-aa_XKBZ3_mcb=V2z7zug@mail.gmail.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