@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
791
791
<para>
792
792
The optional <function>filter_prepare_cb</function> callback
793
793
is called to determine whether data that is part of the current
794
- two-phase commit transaction should be considered for decode
795
- at this prepare stage or as a regular one-phase transaction at
796
- <command>COMMIT PREPARED</command> time later . To signal that
794
+ two-phase commit transaction should be considered for decoding
795
+ at this prepare stage or later as a regular one-phase transaction at
796
+ <command>COMMIT PREPARED</command> time. To signal that
797
797
decoding should be skipped, return <literal>true</literal>;
798
798
<literal>false</literal> otherwise. When the callback is not
799
799
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,12 +820,12 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
820
820
The required <function>begin_prepare_cb</function> callback is called
821
821
whenever the start of a prepared transaction has been decoded. The
822
822
<parameter>gid</parameter> field, which is part of the
823
- <parameter>txn</parameter> parameter can be used in this callback to
824
- check if the plugin has already received this prepare in which case it
825
- can skip the remaining changes of the transaction. This can only happen
826
- if the user restarts the decoding after receiving the prepare for a
827
- transaction but before receiving the commit prepared say because of some
828
- error.
823
+ <parameter>txn</parameter> parameter, can be used in this callback to
824
+ check if the plugin has already received this <command>PREPARE</command>
825
+ in which case it can skip the remaining changes of the transaction.
826
+ This can only happen if the user restarts the decoding after receiving
827
+ the <command>PREPARE</command> for a transaction but before receiving
828
+ the <command>COMMIT PREPARED</command>, say because of some error.
829
829
<programlisting>
830
830
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
831
831
ReorderBufferTXN *txn);
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
842
842
decoded. The <function>change_cb</function> callback for all modified
843
843
rows will have been called before this, if there have been any modified
844
844
rows. The <parameter>gid</parameter> field, which is part of the
845
- <parameter>txn</parameter> parameter can be used in this callback.
845
+ <parameter>txn</parameter> parameter, can be used in this callback.
846
846
<programlisting>
847
847
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
848
848
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
856
856
857
857
<para>
858
858
The required <function>commit_prepared_cb</function> callback is called
859
- whenever a transaction commit prepared has been decoded. The
860
- <parameter>gid</parameter> field, which is part of the
861
- <parameter>txn</parameter> parameter can be used in this callback.
859
+ whenever a transaction <command>COMMIT PREPARED</command> has been decoded.
860
+ The <parameter>gid</parameter> field, which is part of the
861
+ <parameter>txn</parameter> parameter, can be used in this callback.
862
862
<programlisting>
863
863
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
864
864
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
872
872
873
873
<para>
874
874
The required <function>rollback_prepared_cb</function> callback is called
875
- whenever a transaction rollback prepared has been decoded. The
876
- <parameter>gid</parameter> field, which is part of the
877
- <parameter>txn</parameter> parameter can be used in this callback. The
875
+ whenever a transaction <command>ROLLBACK PREPARED</command> has been
876
+ decoded. The <parameter>gid</parameter> field, which is part of the
877
+ <parameter>txn</parameter> parameter, can be used in this callback. The
878
878
parameters <parameter>prepare_end_lsn</parameter> and
879
879
<parameter>prepare_time</parameter> can be used to check if the plugin
880
- has received this prepare transaction in which case it can apply the
881
- rollback, otherwise, it can skip the rollback operation. The
880
+ has received this <command>PREPARE TRANSACTION</command> in which case
881
+ it can apply the rollback, otherwise, it can skip the rollback operation. The
882
882
<parameter>gid</parameter> alone is not sufficient because the downstream
883
- node can have prepared transaction with same identifier.
883
+ node can have a prepared transaction with same identifier.
884
884
<programlisting>
885
885
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
886
886
ReorderBufferTXN *txn,
@@ -1122,7 +1122,8 @@ OutputPluginWrite(ctx, true);
1122
1122
the <function>stream_commit_cb</function> callback
1123
1123
(or possibly aborted using the <function>stream_abort_cb</function> callback).
1124
1124
If two-phase commits are supported, the transaction can be prepared using the
1125
- <function>stream_prepare_cb</function> callback, commit prepared using the
1125
+ <function>stream_prepare_cb</function> callback,
1126
+ <command>COMMIT PREPARED</command> using the
1126
1127
<function>commit_prepared_cb</function> callback or aborted using the
1127
1128
<function>rollback_prepared_cb</function>.
1128
1129
</para>
@@ -1214,7 +1215,7 @@ stream_commit_cb(...); <-- commit of the streamed transaction
1214
1215
</para>
1215
1216
1216
1217
<para>
1217
- When a prepared transaction is rollbacked using the
1218
+ When a prepared transaction is rolled back using the
1218
1219
<command>ROLLBACK PREPARED</command>, then the
1219
1220
<function>rollback_prepared_cb</function> callback is invoked and when the
1220
1221
prepared transaction is committed using <command>COMMIT PREPARED</command>,
0 commit comments