From e59e2b34f337e01e65fc7bb967ee8d899bb81649 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 24 Mar 2021 18:30:06 +1100 Subject: [PATCH v66] Updated worker.c comment --- src/backend/replication/logical/worker.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/replication/logical/worker.c b/src/backend/replication/logical/worker.c index c27db32..634fd92 100644 --- a/src/backend/replication/logical/worker.c +++ b/src/backend/replication/logical/worker.c @@ -91,6 +91,10 @@ * prepares but we ensure that such prepares are sent along with commit * prepare, see ReorderBufferFinishPrepared. * + * If the subscription has no tables then a two_phase tri-state PENDING is + * left unchanged. This lets the user still do an ALTER TABLE REFRESH + * PUBLICATION which might otherwise be disallowed (see below). + * * If ever a user needs to be aware of the tri-state value, they can fetch it * from the pg_subscription catalog (see column subtwophasestate). * @@ -104,8 +108,8 @@ * Finally, to avoid problems mentioned in previous paragraphs from any * subsequent (not READY) tablesyncs (need to toggle two_phase option from 'on' * to 'off' and then again back to 'on') there is a restriction for - * ALTER SUBSCRIPTION REFRESH PUBLICATION. This command is not permitted for - * two_phase = on, except when copy_data = false. + * ALTER SUBSCRIPTION REFRESH PUBLICATION. This command is not permitted when + * the two_phase tri-state is ENABLED, except when copy_data = false. * * We can get prepare of the same GID more than once for the genuine cases * where we have defined multiple subscriptions for publications on the same -- 1.8.3.1