| From: | Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com> |
|---|---|
| To: | Ajin Cherian <itsajin(at)gmail(dot)com> |
| Cc: | vignesh C <vignesh21(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: [PATCH] Preserve replication origin OIDs in pg_upgrade |
| Date: | 2026-05-11 18:32:02 |
| Message-ID: | CAN4CZFN4oLdxLwUXHUPV-5mFmK+4dcnppP00fV3i4qmMYCAkGA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
A few more minor comments:
binary_upgrade_replorigin_advance seems like dead code in the patch
now, it has no callers since the patch removes its only use.
+ ReplOriginId node;
....
+ node = PG_GETARG_OID(0);
ReplOriginId is uint16, this silently truncates it. Since this is a
generic callable function shouldn't there be at least a check about
it?
Also, seems like the same function
(binary_upgrade_create_replication_origin) locks-unlocks-locks
ReplicationOriginRelationId, that doesn't seem the best approach with
a single-use helper function? (first in
replorigin_create_with_reploriginid, then
binary_upgrade_create_replication_origin reaquires it)
+ if (PQntuples(res) > 0 && archDumpFormat == archNull)
+ fprintf(OPF, "--\n-- Replication Origins \n--\n\n");
The caller also checks the format, it is redundant.
+ /* Get replication origins in current database. */
+ appendPQExpBufferStr(buf,
Isn't pg_replication_origin a shared catalog?
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Marcos Pegoraro | 2026-05-11 18:33:08 | Re: Missing jsonb_ ... functions on DOCs |
| Previous Message | Daniel Bauman | 2026-05-11 18:18:52 | Re: Doc update proposal for the note on log_statement in the runtime config for logging page |