On Mon, Mar 8, 2021 at 2:43 PM Ajin Cherian <itsa...@gmail.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.