Re: DOCS - Clarify that REFRESH SEQUENCES might be using stale publication data - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: DOCS - Clarify that REFRESH SEQUENCES might be using stale publication data
Date
Msg-id CAA4eK1Jr-f1fhELi2XxF=u8NNBBNOPv7dQiNPFsd3twC1w98BA@mail.gmail.com
Whole thread
Responses Re: DOCS - Clarify that REFRESH SEQUENCES might be using stale publication data
List pgsql-hackers
On Thu, Jul 2, 2026 at 8:29 AM Peter Smith <smithpb2250@gmail.com> wrote:
>
> The docs do refer to "currently subscribed sequences" but do not
> explicitly warn about this gotcha.
>
> PSA: a patch to add a clarifying sentence.
>

It does not add or remove
       sequences from the subscription to match the publication.
      </para>
+     <para>
+      If the publication's sequence membership has changed,
+      <link linkend="sql-altersubscription-params-refresh-publication">
+      <command>ALTER SUBSCRIPTION ... REFRESH PUBLICATION</command></link>
+      should be run before <literal>REFRESH SEQUENCES</literal> to ensure the
+      subscription's known sequence list is current.
+     </para>

It is already mentioned that this command "does not add or remove
sequences from the subscription to match the publication.". Adding
more information, especially a separate para for the same, appears
like bloating the text in docs. OTOH, I see your point of running
REFRESH PUBLICATION before REFRESH SEQUENCES which I tried to cover in
the existing paragraph. Apart from that, I have merged your
doc-changes from another thread [1] which is on the same topic. Let's
commit them together.

[1] - https://www.postgresql.org/message-id/CAHut%2BPsrVntfrJ8gV45%2B6%3D1bs5dTWD5mU7Q6aKrBnf1vmyZQkQ%40mail.gmail.com

--
With Regards,
Amit Kapila.

Attachment

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: Fix floating-point noise in pg_stat_us_to_ms()
Next
From: Akshay Joshi
Date:
Subject: Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements