agora 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
* extended statistics n-distinct on multiple columns not used when join two tables
@ 2023-06-13 09:21 James Pang (chaolpan) <[email protected]>
0 siblings, 0 replies; 24+ messages in thread
From: James Pang (chaolpan) @ 2023-06-13 09:21 UTC (permalink / raw)
To: [email protected] <[email protected]>
Hi,
When join two table on multiple columns equaljoin, rows estimation always use selectivity = multiplied by distinct multiple individual columns, possible to use extended n-distinct statistics on multiple columns?
PG v14.8-1, attached please check test case with details.
Thanks,
James
testdb=> \d test1
Table "csdigital.test1"
Column | Type | Collation | Nullable | Default
-----------------+------------------------+-----------+----------+---------
account_key | character varying(36) | | not null |
subscription_id | character varying(36) | | not null |
site_key | character varying(36) | | not null |
site_id | numeric(38,0) | | |
site_name | character varying(128) | | |
Indexes:
"test1_pk" PRIMARY KEY, btree (account_key, subscription_id, site_key)
testdb=> \d test2
Table "csdigital.test2"
Column | Type | Collation | Nullable | Default
-----------------+------------------------+-----------+----------+---------
account_key | character varying(36) | | not null |
subscription_id | character varying(36) | | not null |
offer_code | character varying(128) | | not null |
offer_name | character varying(128) | | |
offer_type | character varying(128) | | |
Indexes:
"test2_pk" PRIMARY KEY, btree (account_key, subscription_id, offer_code)
testdb=> explain select count(*) from test1 t1,test2 t2 where t1.account_key=t2.account_key and t1.subscription_id=t2.subscription_id;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=629339.31..629339.32 rows=1 width=8)
-> Merge Join (cost=1.99..629339.26 rows=22 width=0)
Merge Cond: (((t1.account_key)::text = (t2.account_key)::text) AND ((t1.subscription_id)::text = (t2.subscription_id)::text))
-> Index Only Scan using test1_pk on test1 t1 (cost=0.56..263134.00 rows=4906772 width=61)
-> Index Only Scan using test2_pk on test2 t2 (cost=0.56..309937.54 rows=6346934 width=59)
(5 rows)
Time: 8.018 ms
testdb=> SELECT (SELECT sum(x) FROM unnest(most_common_freqs) x) frac_MCV, tablename, attname, inherited, null_frac, n_distinct, array_length(most_common_vals,1) n_mcv, array_length(histogram_bounds,1) n_hist, correlation
testdb-> FROM pg_stats WHERE attname in ('account_key','subscription_id') AND tablename='test1' ORDER BY 1 DESC;
frac_mcv | tablename | attname | inherited | null_frac | n_distinct | n_mcv | n_hist | correlation
---------------+-----------+-----------------+-----------+-----------+------------+-------+--------+--------------
0.00026666667 | test1 | account_key | f | 0 | 249474 | 1 | 101 | -0.008081022
0.00026666667 | test1 | subscription_id | f | 0 | -0.6047012 | 1 | 101 | 0.26008433
(2 rows)
Time: 7.760 ms
testdb=> SELECT (SELECT sum(x) FROM unnest(most_common_freqs) x) frac_MCV, tablename, attname, inherited, null_frac, n_distinct, array_length(most_common_vals,1) n_mcv, array_length(histogram_bounds,1) n_hist, correlation
testdb-> FROM pg_stats WHERE attname in ('account_key','subscription_id') AND tablename='test2' ORDER BY 1 DESC;
frac_mcv | tablename | attname | inherited | null_frac | n_distinct | n_mcv | n_hist | correlation
----------+-----------+-----------------+-----------+-----------+-------------+-------+--------+-------------
| test2 | account_key | f | 0 | 325385 | | 101 | 0.006174604
| test2 | subscription_id | f | 0 | -0.68929785 | | 101 | 0.123789854
(2 rows)
Time: 1.423 ms
testdb=> select relname,reltuples from pg_class where relname in ('test1','test2');
relname | reltuples
---------+--------------
test1 | 4.906772e+06
test2 | 6.346934e+06
(2 rows)
Time: 0.746 ms
testdb=> create statistics cs_contract_site_map_account_key_subscription_id(dependencies, ndistinct) on account_key, subscription_id from test1;
CREATE STATISTICS
Time: 7.918 ms
testdb=> create statistics cs_contract_account_key_subscription_id(dependencies, ndistinct) on account_key, subscription_id from test2;
CREATE STATISTICS
Time: 1.558 ms
testdb=> analyze test1;
aANALYZE
Time: 745.952 ms
testdb=> analyze test2;
ANALYZE
Time: 606.735 ms
testdb=> select st.stxrelid,st.stxname,st.stxstattarget,st.stxkeys,std.stxdndistinct,std.stxddependencies
testdb-> from pg_statistic_ext st join pg_statistic_ext_data std on st.oid=std.stxoid;
ERROR: permission denied for table pg_statistic_ext_data
Time: 2.464 ms
testdb=# select st.stxrelid,st.stxname,st.stxstattarget,st.stxkeys,std.stxdndistinct,std.stxddependencies
testdb-# from pg_statistic_ext st join pg_statistic_ext_data std on st.oid=std.stxoid;
stxrelid | stxname | stxstattarget | stxkeys | stxdndistinct | stxddependencies
----------+--------------------------------------------------+---------------+---------+-------------------+------------------------------------------
5920481 | cs_contract_site_map_account_key_subscription_id | -1 | 1 2 | {"1, 2": 3552572} | {"1 => 2": 0.891333, "2 => 1": 0.997467}
5920675 | cs_contract_account_key_subscription_id | -1 | 1 2 | {"1, 2": 6173026} | {"1 => 2": 0.917700, "2 => 1": 0.997400}
(2 rows)
testdb=> explain select count(*) from test1 t1,test2 t2 where t1.account_key=t2.account_key and t1.subscription_id=t2.subscription_id;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=629329.20..629329.21 rows=1 width=8)
-> Merge Join (cost=1.28..629329.15 rows=23 width=0) <<< here we expect extended ndistinct used to rows = much more value, but still use distinct(account_key)*distinct(subscription_id)
Merge Cond: (((t1.account_key)::text = (t2.account_key)::text) AND ((t1.subscription_id)::text = (t2.subscription_id)::text))
-> Index Only Scan using test1_pk on test1 t1 (cost=0.56..263134.59 rows=4906790 width=61)
-> Index Only Scan using test2_pk on test2 t2 (cost=0.56..309935.05 rows=6346754 width=59)
(5 rows)
Time: 4.307 ms
Attachments:
[text/plain] test_join_selectivity_rows_estimation_join.txt (6.3K, ../../PH0PR11MB519189611860A0F7FDE53509D655A@PH0PR11MB5191.namprd11.prod.outlook.com/3-test_join_selectivity_rows_estimation_join.txt)
download | inline:
testdb=> \d test1
Table "csdigital.test1"
Column | Type | Collation | Nullable | Default
-----------------+------------------------+-----------+----------+---------
account_key | character varying(36) | | not null |
subscription_id | character varying(36) | | not null |
site_key | character varying(36) | | not null |
site_id | numeric(38,0) | | |
site_name | character varying(128) | | |
Indexes:
"test1_pk" PRIMARY KEY, btree (account_key, subscription_id, site_key)
testdb=> \d test2
Table "csdigital.test2"
Column | Type | Collation | Nullable | Default
-----------------+------------------------+-----------+----------+---------
account_key | character varying(36) | | not null |
subscription_id | character varying(36) | | not null |
offer_code | character varying(128) | | not null |
offer_name | character varying(128) | | |
offer_type | character varying(128) | | |
Indexes:
"test2_pk" PRIMARY KEY, btree (account_key, subscription_id, offer_code)
testdb=> explain select count(*) from test1 t1,test2 t2 where t1.account_key=t2.account_key and t1.subscription_id=t2.subscription_id;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=629339.31..629339.32 rows=1 width=8)
-> Merge Join (cost=1.99..629339.26 rows=22 width=0)
Merge Cond: (((t1.account_key)::text = (t2.account_key)::text) AND ((t1.subscription_id)::text = (t2.subscription_id)::text))
-> Index Only Scan using test1_pk on test1 t1 (cost=0.56..263134.00 rows=4906772 width=61)
-> Index Only Scan using test2_pk on test2 t2 (cost=0.56..309937.54 rows=6346934 width=59)
(5 rows)
Time: 8.018 ms
testdb=> SELECT (SELECT sum(x) FROM unnest(most_common_freqs) x) frac_MCV, tablename, attname, inherited, null_frac, n_distinct, array_length(most_common_vals,1) n_mcv, array_length(histogram_bounds,1) n_hist, correlation
testdb-> FROM pg_stats WHERE attname in ('account_key','subscription_id') AND tablename='test1' ORDER BY 1 DESC;
frac_mcv | tablename | attname | inherited | null_frac | n_distinct | n_mcv | n_hist | correlation
---------------+-----------+-----------------+-----------+-----------+------------+-------+--------+--------------
0.00026666667 | test1 | account_key | f | 0 | 249474 | 1 | 101 | -0.008081022
0.00026666667 | test1 | subscription_id | f | 0 | -0.6047012 | 1 | 101 | 0.26008433
(2 rows)
Time: 7.760 ms
testdb=> SELECT (SELECT sum(x) FROM unnest(most_common_freqs) x) frac_MCV, tablename, attname, inherited, null_frac, n_distinct, array_length(most_common_vals,1) n_mcv, array_length(histogram_bounds,1) n_hist, correlation
testdb-> FROM pg_stats WHERE attname in ('account_key','subscription_id') AND tablename='test2' ORDER BY 1 DESC;
frac_mcv | tablename | attname | inherited | null_frac | n_distinct | n_mcv | n_hist | correlation
----------+-----------+-----------------+-----------+-----------+-------------+-------+--------+-------------
| test2 | account_key | f | 0 | 325385 | | 101 | 0.006174604
| test2 | subscription_id | f | 0 | -0.68929785 | | 101 | 0.123789854
(2 rows)
Time: 1.423 ms
testdb=> select relname,reltuples from pg_class where relname in ('test1','test2');
relname | reltuples
---------+--------------
test1 | 4.906772e+06
test2 | 6.346934e+06
(2 rows)
Time: 0.746 ms
testdb=> create statistics cs_contract_site_map_account_key_subscription_id(dependencies, ndistinct) on account_key, subscription_id from test1;
CREATE STATISTICS
Time: 7.918 ms
testdb=> create statistics cs_contract_account_key_subscription_id(dependencies, ndistinct) on account_key, subscription_id from test2;
CREATE STATISTICS
Time: 1.558 ms
testdb=> analyze test1;
aANALYZE
Time: 745.952 ms
testdb=> analyze test2;
ANALYZE
Time: 606.735 ms
testdb=> select st.stxrelid,st.stxname,st.stxstattarget,st.stxkeys,std.stxdndistinct,std.stxddependencies
testdb-> from pg_statistic_ext st join pg_statistic_ext_data std on st.oid=std.stxoid;
ERROR: permission denied for table pg_statistic_ext_data
Time: 2.464 ms
testdb=# select st.stxrelid,st.stxname,st.stxstattarget,st.stxkeys,std.stxdndistinct,std.stxddependencies
testdb-# from pg_statistic_ext st join pg_statistic_ext_data std on st.oid=std.stxoid;
stxrelid | stxname | stxstattarget | stxkeys | stxdndistinct | stxddependencies
----------+--------------------------------------------------+---------------+---------+-------------------+------------------------------------------
5920481 | cs_contract_site_map_account_key_subscription_id | -1 | 1 2 | {"1, 2": 3552572} | {"1 => 2": 0.891333, "2 => 1": 0.997467}
5920675 | cs_contract_account_key_subscription_id | -1 | 1 2 | {"1, 2": 6173026} | {"1 => 2": 0.917700, "2 => 1": 0.997400}
(2 rows)
testdb=> explain select count(*) from test1 t1,test2 t2 where t1.account_key=t2.account_key and t1.subscription_id=t2.subscription_id;
QUERY PLAN
---------------------------------------------------------------------------------------------------------------------------------------
Aggregate (cost=629329.20..629329.21 rows=1 width=8)
-> Merge Join (cost=1.28..629329.15 rows=23 width=0) <<< here we expect extended ndistinct used to rows = much more value, but still use distinct(account_key)*distinct(subscription_id)
Merge Cond: (((t1.account_key)::text = (t2.account_key)::text) AND ((t1.subscription_id)::text = (t2.subscription_id)::text))
-> Index Only Scan using test1_pk on test1 t1 (cost=0.56..263134.59 rows=4906790 width=61)
-> Index Only Scan using test2_pk on test2 t2 (cost=0.56..309935.05 rows=6346754 width=59)
(5 rows)
Time: 4.307 ms
^ permalink raw reply [nested|flat] 24+ messages in thread
end of thread, other threads:[~2023-06-13 09:21 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-06-13 09:21 extended statistics n-distinct on multiple columns not used when join two tables James Pang (chaolpan) <[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