public inbox for [email protected]
help / color / mirror / Atom feed[PATCH 16/21] doc review for logical decoding of prepared xacts
24+ messages / 2 participants
[nested] [flat]
* [PATCH 16/21] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--jI8keyz6grp/JLjh
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH 16/18] doc review for logical decoding of prepared xacts
@ 2021-01-24 03:03 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:03 UTC (permalink / raw)
0aa8a01d04c8fe200b7a106878eebc3d0af9105c
---
doc/src/sgml/logicaldecoding.sgml | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
diff --git a/doc/src/sgml/logicaldecoding.sgml b/doc/src/sgml/logicaldecoding.sgml
index b854f2ccfc..71e9f36b8e 100644
--- a/doc/src/sgml/logicaldecoding.sgml
+++ b/doc/src/sgml/logicaldecoding.sgml
@@ -791,9 +791,9 @@ typedef void (*LogicalDecodeMessageCB) (struct LogicalDecodingContext *ctx,
<para>
The optional <function>filter_prepare_cb</function> callback
is called to determine whether data that is part of the current
- two-phase commit transaction should be considered for decode
- at this prepare stage or as a regular one-phase transaction at
- <command>COMMIT PREPARED</command> time later. To signal that
+ two-phase commit transaction should be considered for decoding
+ at this prepare stage or later as a regular one-phase transaction at
+ <command>COMMIT PREPARED</command> time. To signal that
decoding should be skipped, return <literal>true</literal>;
<literal>false</literal> otherwise. When the callback is not
defined, <literal>false</literal> is assumed (i.e. nothing is
@@ -820,11 +820,11 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
The required <function>begin_prepare_cb</function> callback is called
whenever the start of a prepared transaction has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback to
- check if the plugin has already received this prepare in which case it
+ <parameter>txn</parameter> parameter, can be used in this callback to
+ check if the plugin has already received this PREPARE in which case it
can skip the remaining changes of the transaction. This can only happen
- if the user restarts the decoding after receiving the prepare for a
- transaction but before receiving the commit prepared say because of some
+ if the user restarts the decoding after receiving the PREPARE for a
+ transaction but before receiving the COMMIT PREPARED, say because of some
error.
<programlisting>
typedef void (*LogicalDecodeBeginPrepareCB) (struct LogicalDecodingContext *ctx,
@@ -842,7 +842,7 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
decoded. The <function>change_cb</function> callback for all modified
rows will have been called before this, if there have been any modified
rows. The <parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodePrepareCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -856,9 +856,9 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>commit_prepared_cb</function> callback is called
- whenever a transaction commit prepared has been decoded. The
+ whenever a transaction COMMIT PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback.
+ <parameter>txn</parameter> parameter, can be used in this callback.
<programlisting>
typedef void (*LogicalDecodeCommitPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -872,15 +872,15 @@ typedef bool (*LogicalDecodeFilterPrepareCB) (struct LogicalDecodingContext *ctx
<para>
The required <function>rollback_prepared_cb</function> callback is called
- whenever a transaction rollback prepared has been decoded. The
+ whenever a transaction ROLLBACK PREPARED has been decoded. The
<parameter>gid</parameter> field, which is part of the
- <parameter>txn</parameter> parameter can be used in this callback. The
+ <parameter>txn</parameter> parameter, can be used in this callback. The
parameters <parameter>prepare_end_lsn</parameter> and
<parameter>prepare_time</parameter> can be used to check if the plugin
- has received this prepare transaction in which case it can apply the
+ has received this PREPARE TRANSACTION in which case it can apply the
rollback, otherwise, it can skip the rollback operation. The
<parameter>gid</parameter> alone is not sufficient because the downstream
- node can have prepared transaction with same identifier.
+ node can have a prepared transaction with same identifier.
<programlisting>
typedef void (*LogicalDecodeRollbackPreparedCB) (struct LogicalDecodingContext *ctx,
ReorderBufferTXN *txn,
@@ -1122,7 +1122,7 @@ OutputPluginWrite(ctx, true);
the <function>stream_commit_cb</function> callback
(or possibly aborted using the <function>stream_abort_cb</function> callback).
If two-phase commits are supported, the transaction can be prepared using the
- <function>stream_prepare_cb</function> callback, commit prepared using the
+ <function>stream_prepare_cb</function> callback, COMMIT PREPARED using the
<function>commit_prepared_cb</function> callback or aborted using the
<function>rollback_prepared_cb</function>.
</para>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0017-an-old-and-deleted-has-happened.patch"
^ permalink raw reply [nested|flat] 24+ messages in thread
* [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt().
@ 2023-01-28 22:13 Joel Jacobson <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: Joel Jacobson @ 2023-01-28 22:13 UTC (permalink / raw)
To: pgsql-hackers
Hi,
I found what appears to be a small harmless error in numeric.c,
that seems worthwhile to fix only because it's currently causes confusion.
It hasn't caused any problems, since the incorrect formula happens to
always produce the same result for DEC_DIGITS==4.
However, for other DEC_DIGITS values, it causes an undesired variation in the
precision of the results returned by sqrt().
To understand the problem, let's look at the equivalent formula for sweight,
when replacing DEC_DIGITS with the values 1, 2, 4:
HEAD, unpatched:
sweight = (arg.weight + 1) * DEC_DIGITS / 2 - 1
Rewritten:
(arg.weight + 1) * 1 / 2 - 1 <=> arg.weight / 2 - 1 / 2
(arg.weight + 1) * 2 / 2 - 1 <=> arg.weight
(arg.weight + 1) * 4 / 2 - 1 <=> 2 * arg.weight + 1
HEAD, patched:
sweight = (arg.weight * DEC_DIGITS) / 2 + 1
Rewritten:
(arg.weight * 1) / 2 + 1 <=> arg.weight / 2 + 1
(arg.weight * 2) / 2 + 1 <=> arg.weight + 1
(arg.weight * 4) / 2 + 1 <=> 2 * arg.weight + 1
As we can see, the equivalent formula for the patched version is arg.weight
times half the DEC_DIGITS, plus one.
The first part of the formula is the same but note how the patched version
gives a constant addition of `+ 1` regardless of the DEC_DIGITS value,
whereas the unpatched version gives strange subtractions/additions
such as `- 1 / 2` and `+ 3`.
Demonstration of the undesired result digit precision variation effect:
HEAD, unpatched:
DEC_DIGITS sqrt(2::numeric)
4 1.414213562373095
2 1.4142135623730950
1 1.41421356237309505
HEAD, patched:
DEC_DIGITS sqrt(2::numeric)
4 1.414213562373095
2 1.414213562373095
1 1.414213562373095
The patched version consistently returns 16 significant digits for sqrt(2::numeric)
when DEC_DIGITS is 1, 2 and 4, whereas the unpatched version surprisingly
gives 18 sig. digits for DEC_DIGITS==1 and 17 sig. digits for DEC_DIGITS==2.
Note, however, that it's still possible to find examples of when sqrt(numeric)
produce results with different precision for different DEC_DIGITS/NBASE values,
but in such cases, it's intentional, and due to getting additional precision
for free, since the larger the NBASE, the more decimal digits are produced
at the same time per iteration in the calculation.
Example:
HEAD, unpatched
DEC_DIGITS sqrt(102::numeric)
4 10.09950493836208
2 10.099504938362078
1 10.0995049383620780
HEAD, patched:
DEC_DIGITS sqrt(102::numeric)
4 10.099504938362078
2 10.09950493836208
1 10.09950493836208
According to the comment in numeric_sqrt(), the goal is to give at least
NUMERIC_MIN_SIG_DIGITS (16) significant digits.
Since 10.09950493836208 has 16 significant digits, we can see above how
DEC_DIGITS==2 causes an additional unnecessary significant digit to be computed,
and for DEC_DIGITS==1, two additional unnecessary significant digits are
computed.
The patched version returns 16 significant digits as expected for DEC_DIGITS==2
and DEC_DIGITS==1, and for DEC_DIGITS==4 we get an additional digit for free.
To see why we should get an additional digit for the DEC_DIGITS==4 case,
let's enable NUMERIC_DEBUG and look at the result:
SELECT sqrt(102::numeric);
make_result(): NUMERIC w=0 d=0 POS 0102
make_result(): NUMERIC w=0 d=15 POS 0010 0995 0493 8362 0780
sqrt
--------------------
10.099504938362078
(1 row)
Since 10.099504938362 has only 14 sig. digits, we need one more NBASE digit
in the result, thus 0780 is computed, and we get an extra decimal digit for
free.
Compare this to DEC_DIGITS==2, which for the patched version correctly
returns 10.09950493836208, since the last produced NBASE digit `08`
is sufficient, i.e. with it, the result has 16 sig. decimal digits,
which is enough, since NUMERIC_MIN_SIG_DIGITS==16.
In conclusion, the proposed patch fixes a harmless problem, but is important
to fix, since otherwise, anyone who want to experiment with different
DEC_DIGITS/NBASE combinations by changing the `#if 0` preprocessor values
in the top of numeric.c will get surprising results from sqrt().
In passing, also add pow10[] values for DEC_DIGITS==2 and DEC_DIGITS==1,
since otherwise it's not possible to compile such DEC_DIGITS values
due to the assert:
StaticAssertDecl(lengthof(pow10) == DEC_DIGITS, "mismatch with DEC_DIGITS");
/Joel
^ permalink raw reply [nested|flat] 24+ messages in thread
end of thread, other threads:[~2023-01-28 22:13 UTC | newest]
Thread overview: 24+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/21] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2021-01-24 03:03 [PATCH 16/18] doc review for logical decoding of prepared xacts Justin Pryzby <[email protected]>
2023-01-28 22:13 [PATCH] Fix old thinko in formula to compute sweight in numeric_sqrt(). Joel Jacobson <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox