Re: [HACKERS] logical decoding of two-phase transactions

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: vignesh C <vignesh21(at)gmail(dot)com>
Cc: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, Ajin Cherian <itsajin(at)gmail(dot)com>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Date: 2021-07-20 04:02:02
Message-ID: CAHut+PvJZ2=J=FG8Z7CBpr3TJP79gJtz+E5sY+yJ=rkx2HOnug@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 16, 2021 at 4:08 PM vignesh C <vignesh21(at)gmail(dot)com> wrote:
>
[...]
> Thanks for the updated patch, the patch applies cleanly and test passes:
> I had couple of comments:
> 1) Should we include "stream_prepare_cb" here in
> logicaldecoding-streaming section of logicaldecoding.sgml
> documentation:
> To reduce the apply lag caused by large transactions, an output plugin
> may provide additional callback to support incremental streaming of
> in-progress transactions. There are multiple required streaming
> callbacks (stream_start_cb, stream_stop_cb, stream_abort_cb,
> stream_commit_cb and stream_change_cb) and two optional callbacks
> (stream_message_cb and stream_truncate_cb).
>

Modified in v98. The information about 'stream_prepare_cb' and friends
is given in detail in section 49.10 so I added a link to that page.

> 2) Should we add an example for stream_prepare_cb here in
> logicaldecoding-streaming section of logicaldecoding.sgml
> documentation:
> One example sequence of streaming callback calls for one transaction
> may look like this:
>
> stream_start_cb(...); <-- start of first block of changes
> stream_change_cb(...);
> stream_change_cb(...);
> stream_message_cb(...);
> stream_change_cb(...);
> ...
> stream_change_cb(...);
> stream_stop_cb(...); <-- end of first block of changes
>
> stream_start_cb(...); <-- start of second block of changes
> stream_change_cb(...);
> stream_change_cb(...);
> stream_change_cb(...);
> ...
> stream_message_cb(...);
> stream_change_cb(...);
> stream_stop_cb(...); <-- end of second block of changes
>
> stream_commit_cb(...); <-- commit of the streamed transaction
>

Modified in v98. I felt it would be too verbose to add another full
example since it would be 90% the same as the current example. So I
have combined the information.

------
Kind Regards,
Peter Smith.
Fujitsu Australia

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-07-20 04:12:21 Re: Failure with 004_logrotate in prairiedog
Previous Message Peter Smith 2021-07-20 03:56:16 Re: [HACKERS] logical decoding of two-phase transactions