v19-0003-Notify-users-to-roll-back-prepared-transactions.patch
application/octet-stream
Filename: v19-0003-Notify-users-to-roll-back-prepared-transactions.patch
Type: application/octet-stream
Part: 2
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v19-0003
Subject: Notify users to roll back prepared transactions
| File | + | − |
|---|---|---|
| doc/src/sgml/ref/alter_subscription.sgml | 14 | 2 |
From 34cd7afbeafb90da3c65a71cf12362c980019061 Mon Sep 17 00:00:00 2001
From: Hayato Kuroda <kuroda.hayato@fujitsu.com>
Date: Tue, 9 Jul 2024 08:01:43 +0000
Subject: [PATCH v19 3/3] Notify users to roll back prepared transactions
---
doc/src/sgml/ref/alter_subscription.sgml | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/ref/alter_subscription.sgml b/doc/src/sgml/ref/alter_subscription.sgml
index df44415661..58db97f415 100644
--- a/doc/src/sgml/ref/alter_subscription.sgml
+++ b/doc/src/sgml/ref/alter_subscription.sgml
@@ -233,8 +233,6 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>, and
<link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>.
Only a superuser can set <literal>password_required = false</literal>.
- The <literal>two_phase</literal> parameter can only be altered when the
- subscription is disabled.
</para>
<para>
@@ -256,6 +254,20 @@ ALTER SUBSCRIPTION <replaceable class="parameter">name</replaceable> RENAME TO <
<link linkend="sql-createsubscription-params-with-failover"><literal>failover</literal></link>
option is enabled.
</para>
+
+ <para>
+ The <link linkend="sql-createsubscription-params-with-two-phase"><literal>two_phase</literal></link>
+ parameter can only be altered when the subscription is disabled.
+ When altering the parameter from <literal>true</literal>
+ to <literal>false</literal>, the backend process checks for any incomplete
+ prepared transactions done by the logical replication worker (from when
+ <literal>two_phase</literal> parameter was still <literal>true</literal>)
+ and, if any are found, an error is reported. If this happens, you can
+ resolve prepared transactions on the publisher node or
+ manually roll back them on the subscriber, then try again. After the altering from
+ <literal>true</literal> to <literal>false</literal>, the publisher will
+ replicate transactions again when they are committed.
+ </para>
</listitem>
</varlistentry>
--
2.43.0