From 34cd7afbeafb90da3c65a71cf12362c980019061 Mon Sep 17 00:00:00 2001 From: Hayato Kuroda 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 name RENAME TO < failover, and two_phase. Only a superuser can set password_required = false. - The two_phase parameter can only be altered when the - subscription is disabled. @@ -256,6 +254,20 @@ ALTER SUBSCRIPTION name RENAME TO < failover option is enabled. + + + The two_phase + parameter can only be altered when the subscription is disabled. + When altering the parameter from true + to false, the backend process checks for any incomplete + prepared transactions done by the logical replication worker (from when + two_phase parameter was still true) + 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 + true to false, the publisher will + replicate transactions again when they are committed. + -- 2.43.0