| From: | Peter Smith <smithpb2250(at)gmail(dot)com> |
|---|---|
| To: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Cc: | Ajin Cherian <itsajin(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, shveta malik <shvetamalik(at)gmail(dot)com> |
| Subject: | Re: Initial table sync copies the whole table when it is no longer published |
| Date: | 2026-11-23 02:48:22 |
| Message-ID: | CAHut+Pubf_VGhH=sVovE5BJN6DVQnywgL2t8WwvopF-FzkoiWg@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Some review comments for v4
PATCH v4-0002 (docs)
======
doc/src/sgml/ref/alter_subscription.sgml
1.
+ <note>
+ <para>
+ This command cannot be run while the subscription is disabled. If the
+ subscription was disabled by
+ <link linkend="sql-createsubscription-params-with-disable-on-error"><literal>disable_on_error</literal></link>
+ because initial table synchronization keeps failing, for example
+ because the table or the publication was dropped on the publisher, or
+ the table was removed from the publication, this command is needed to
+ remove the table from the subscription. To resolve this, either fix
+ the cause on the publisher before re-enabling the subscription, or
+ temporarily set
+ <literal>disable_on_error</literal> to <literal>false</literal>,
+ re-enable the subscription using
+ <link linkend="sql-altersubscription-params-enable"><command>ALTER
SUBSCRIPTION ... ENABLE</command></link>,
+ run <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command>, and
+ then set <literal>disable_on_error</literal> back to
+ <literal>true</literal>.
+ </para>
+ </note>
It's OK, but IMO it wasn't necessary to give so many details about the
kind of error that might have led to this. IIUC, the main point is
that you may need to turn off `disable_on_error temporarily.
Also, it seemed a bit wordy to spell out the full commands for "ALTER
SUBSCRIPTION ... ENABLE" (which is elsewhere on the same page) and for
"ALTER SUBSCRIPTION ... REFRESH PUBLICATION" (since this note is
already within the context of that command).
Here is some shorter text for consideration. It keeps the essential
steps but avoids enumerating failure causes, which may not be
exhaustive anyway.
<para>
This command cannot be run while the subscription is disabled. If the
subscription was disabled by
<link linkend="sql-createsubscription-params-with-disable-on-error"><literal>disable_on_error</literal></link>,
temporarily set it to <literal>false</literal>,
<link linkend="sql-altersubscription-params-enable">re-enable</link>
the subscription, perform the refresh, and then set it back to
<literal>true</literal>.
</para>
YMMV.
======
Kind Regards,
Peter Smith.
Fujitsu Australia
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Peter Smith | 2026-11-23 04:07:42 | Re: [PATCH v1] Fix initial sync of zero-column published tables |
| Previous Message | Xuneng Zhou | 2026-11-23 02:18:28 | Re: [PATCH v1 0/2] Preserve input sign across numeric parameter parsing |