Re: Make stream_prepare an optional callback

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Markus Wanner <markus(dot)wanner(at)enterprisedb(dot)com>
Cc: Ajin Cherian <itsajin(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Make stream_prepare an optional callback
Date: 2021-03-09 10:34:25
Message-ID: CAA4eK1JJC3fK-LiBtjDNgx4sjv+EBcpxhOnnSJoNBN3ELogdfQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Mar 9, 2021 at 3:41 PM Markus Wanner
<markus(dot)wanner(at)enterprisedb(dot)com> wrote:
>
> On 09.03.21 10:37, Amit Kapila wrote:
> I guess I don't quite understand the initial motivation for the patch.
> It states: "This allows plugins to not allow the enabling of streaming
> and two_phase at the same time in logical replication." That's beyond
> me ... "allows [..] to not allow"? Why not, an output plugin can still
> reasonably request both. And that's a good thing, IMO. What problem
> does the patch try to solve?
>

AFAIU, Ajin doesn't want to mandate streaming with two_pc option. But,
maybe you are right that it doesn't make sense for the user to provide
both options but doesn't provide stream_prepare callback, and giving
an error in such a case should be fine. I think if we have to follow
Ajin's idea then we need to skip 2PC in such a case (both prepare and
commit prepare) and make this a regular transaction.

--
With Regards,
Amit Kapila.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josef Šimánek 2021-03-09 10:39:48 Re: Improvements and additions to COPY progress reporting
Previous Message Joel Jacobson 2021-03-09 10:32:11 Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]