On Thu, 25 Jun 2026 at 06:29, Peter Smith <[email protected]> wrote: > > Hi Vignesh. > > Some comments for v2. > > ====== > doc/src/sgml/ref/pg_createsubscriber.sgml > > 1. > fresh logical replication setup. The main difference between the logical > replication setup and <application>pg_createsubscriber</application> is > how > the data synchronization is done. > <application>pg_createsubscriber</application> > - does not copy the initial table data. It does only the > synchronization phase, > - which ensures each table is brought up to a synchronized state. > + does not copy the initial table or sequence data. It does only the > + synchronization phase, which ensures each table and sequence is brought up > + to a synchronized state. > > 1a. > OK. Thanks for the explanation on what was meant. Personally, I found > the wording "sequence is brought up to a synchronized state" > ambiguous, because in my mind the sequence value is a part of the > sequence state. > > Below is some alternate wording for consideration: > > SUGGESTION: > pg_createsubscriber performs only the synchronization phase, which > prepares each table and sequence for replication. It does not copy > table data or synchronize sequence values from the publisher.
I have separated the table and sequence part to avoid confusion. > ~~~ > > 1b. > While reviewing this patch I also referred to section "29.7. > Replicating Sequences #". [1] for more information. But there I was > tricked by some (misleading?) wording. > I have created another thread [2] to discuss/patch that. Please see it > and post your thoughts. Thanks for working on this, I have shared a couple of comments at [1]. > ~~~ > > 2. > + <para> > + Note that although the publication includes sequences, sequence value > + changes made on the publisher after reaching consistent point are not > + synchronized incrementally. To synchronize sequence values, run > + <link linkend="sql-altersubscription-params-refresh-sequences"> > + <command>ALTER SUBSCRIPTION ... REFRESH SEQUENCES</command></link>, which > + fetches the current sequence state from the publisher and advances the > + corresponding subscriber sequences. > </para> > > I wonder if the last sentence is overly descriptive. Isn't it enough > to just say: > To synchronize sequence values, run <link > linkend="sql-altersubscription-params-refresh-sequences"><command>ALTER > SUBSCRIPTION ... REFRESH SEQUENCES</command></link>. Modified > ~~~ > > 3. > <para> > Enable the subscription for each specified database on the target > server. > The subscription starts applying transactions from the replication > start > - point. > + point. The subscription is configured to include sequences. > </para> > > This implies there was some special subscription "configuration" for > getting sequences, but it just gets sequences because sequences were > published. Maybe you don't need to say anything here. Or, maybe reword > to just say "The subscription will include sequences". I have removed it from here and clarified this in step-3. The attached v3 version patch has the changes for the same. [1] - https://www.postgresql.org/message-id/CALDaNm1xY_Js5-jppiBzGq2HMqzCHk%2BLLpupfWp_cFcG%3DvJXmg%40mail.gmail.com Regards, Vignesh
v3-0001-Include-sequences-in-publications-created-by-pg_c.patch
Description: Binary data
