Re: Make stream_prepare an optional callback

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

On Mon, Mar 8, 2021 at 2:43 PM Ajin Cherian <itsajin(at)gmail(dot)com> wrote:
>
> Hi Hackers,
>
> As part of commit 0aa8a0 , new plugin methods (callbacks) were defined for enabling two_phase commits.
> 5 callbacks were required:
> * begin_prepare
> * prepare
> * commit_prepared
> * rollback_prepared
> * stream_prepare
>
> and 1 callback was optional:
> * filter_prepare
>
> I don't think stream_prepare should be made a required callback for enabling two_phase commits. stream_prepare callback is required when a logical replication slot is configured both for streaming in-progress transactions and two_phase commits. Plugins can and should be allowed to disallow this combination of allowing both streaming and two_phase at the same time. In which case, stream_prepare should be an optional callback.
>

Sounds reasonable to me. I also don't see a reason why we need to make
this a necessary callback. Some plugin authors might just want 2PC
without streaming support.

Markus, others working on logical decoding plugins, do you have any
opinion on this?

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Takashi Menjo 2021-03-09 06:53:45 Re: [PoC] Non-volatile WAL buffer
Previous Message Joel Jacobson 2021-03-09 06:34:36 Re: [PATCH] pg_permissions