Re: Logical Replication of sequences

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Shlok Kyal <shlok(dot)kyal(dot)oss(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Euler Taveira <euler(at)eulerto(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Subject: Re: Logical Replication of sequences
Date: 2025-10-15 08:28:28
Message-ID: 158C2EDB-D505-46A6-996D-296EC1B3ACE2@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I only reviewed 0003 as I saw Amit mentioned next should be 0003. Over LGTM, I just got one comment:

>
> <v20251014-0005-Documentation-for-sequence-synchronization.patch><v20251014-0001-Update-ALTER-SUBSCRIPTION-REFRESH-to-ALTER.patch><v20251014-0002-Introduce-REFRESH-SEQUENCES-for-subscripti.patch><v20251014-0003-Reorganize-tablesync-Code-and-Introduce-sy.patch><v20251014-0004-New-worker-for-sequence-synchronization-du.patch>

In common.c:
```
- pg_log_info("reading subscription membership of tables");
+ pg_log_info("reading subscription membership of relations");
getSubscriptionTables(fout);
```

0003 is replacing “table” with “relation” everywhere, I think that's because Sequence will be involved. In this place, why the comment is updated, but the function name is unchanged? Looking at the function comment of getSubscriptionTables():

/*
* getSubscriptionTables
* Get information about subscription membership for dumpable relations. This
* will be used only in binary-upgrade mode for PG17 or later versions.
*/
void
getSubscriptionTables(Archive *fout)

It also mentions “dumpable relations”. Should we update the function to use “relation” as well?

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2025-10-15 08:38:24 Re: Improve pg_sync_replication_slots() to wait for primary to advance
Previous Message David Rowley 2025-10-15 07:59:40 Re: MergeAppend could consider sorting cheapest child path