On Mon, 17 Mar 2025 at 16:57, Ashutosh Bapat <ashutosh.bapat....@gmail.com> wrote: > > On Mon, Mar 17, 2025 at 4:46 PM Amit Kapila <amit.kapil...@gmail.com> wrote: > > > > On Mon, Mar 17, 2025 at 3:44 PM vignesh C <vignes...@gmail.com> wrote: > > > > > > While reviewing another patch, I found a couple of typos: > > > 1) subid should have been pubid in AlterPublicationOwner and > > > AlterPublicationOwner_oid functions. > > > 2) Only tuples with XIDs/MXIDs older than the the > > > FreezeLimit/MultiXactCutoff are frozen in the common case. > > > Should have been" > > > Only tuples with XIDs/MXIDs older than the FreezeLimit/MultiXactCutoff > > > are frozen in the common case. > > > > > > The attached patch has the changes for the same. > > > > > > > The changes look good to me. > > +1 > > However they look unrelated. We should split them in two commits > s/subid/pubid/ to one and s/the the/the/ to another. I also verified > that this is the only occurrence of "the the" in the code base.
Thanks, the updated v2 has the changes for the same. Regards, Vignesh
From 8c1eb7d8962e4c7b06c2c7516746a49bfa368b4c Mon Sep 17 00:00:00 2001 From: Vignesh <vignes...@gmail.com> Date: Tue, 18 Mar 2025 08:15:30 +0530 Subject: [PATCH v2 1/2] Fix typo Double the in comments. --- src/backend/access/heap/vacuumlazy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/access/heap/vacuumlazy.c b/src/backend/access/heap/vacuumlazy.c index 3b91d02605a..b1fbfca087e 100644 --- a/src/backend/access/heap/vacuumlazy.c +++ b/src/backend/access/heap/vacuumlazy.c @@ -534,7 +534,7 @@ heap_vacuum_eager_scan_setup(LVRelState *vacrel, VacuumParams *params) * Tuples with XIDs older than OldestXmin or MXIDs older than OldestMxact * are technically freezable, but we won't freeze them unless the criteria * for opportunistic freezing is met. Only tuples with XIDs/MXIDs older - * than the the FreezeLimit/MultiXactCutoff are frozen in the common case. + * than the FreezeLimit/MultiXactCutoff are frozen in the common case. * * So, as a heuristic, we wait until the FreezeLimit has advanced past the * relfrozenxid or the MultiXactCutoff has advanced past the relminmxid to -- 2.43.0
From 7ff3e6a120d985ab87369d6ef530025b56b10145 Mon Sep 17 00:00:00 2001 From: Vignesh <vignes...@gmail.com> Date: Tue, 18 Mar 2025 08:19:34 +0530 Subject: [PATCH v2 2/2] Fix typo subid should be pubid. --- src/backend/commands/publicationcmds.c | 12 ++++++------ src/include/commands/publicationcmds.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/backend/commands/publicationcmds.c b/src/backend/commands/publicationcmds.c index 3091d36ce98..0b23d94c38e 100644 --- a/src/backend/commands/publicationcmds.c +++ b/src/backend/commands/publicationcmds.c @@ -2052,7 +2052,7 @@ AlterPublicationOwner_internal(Relation rel, HeapTuple tup, Oid newOwnerId) ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId) { - Oid subid; + Oid pubid; HeapTuple tup; Relation rel; ObjectAddress address; @@ -2068,11 +2068,11 @@ AlterPublicationOwner(const char *name, Oid newOwnerId) errmsg("publication \"%s\" does not exist", name))); pubform = (Form_pg_publication) GETSTRUCT(tup); - subid = pubform->oid; + pubid = pubform->oid; AlterPublicationOwner_internal(rel, tup, newOwnerId); - ObjectAddressSet(address, PublicationRelationId, subid); + ObjectAddressSet(address, PublicationRelationId, pubid); heap_freetuple(tup); @@ -2085,19 +2085,19 @@ AlterPublicationOwner(const char *name, Oid newOwnerId) * Change publication owner -- by OID */ void -AlterPublicationOwner_oid(Oid subid, Oid newOwnerId) +AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId) { HeapTuple tup; Relation rel; rel = table_open(PublicationRelationId, RowExclusiveLock); - tup = SearchSysCacheCopy1(PUBLICATIONOID, ObjectIdGetDatum(subid)); + tup = SearchSysCacheCopy1(PUBLICATIONOID, ObjectIdGetDatum(pubid)); if (!HeapTupleIsValid(tup)) ereport(ERROR, (errcode(ERRCODE_UNDEFINED_OBJECT), - errmsg("publication with OID %u does not exist", subid))); + errmsg("publication with OID %u does not exist", pubid))); AlterPublicationOwner_internal(rel, tup, newOwnerId); diff --git a/src/include/commands/publicationcmds.h b/src/include/commands/publicationcmds.h index e41df6db038..f90cf1ef896 100644 --- a/src/include/commands/publicationcmds.h +++ b/src/include/commands/publicationcmds.h @@ -29,7 +29,7 @@ extern void RemovePublicationRelById(Oid proid); extern void RemovePublicationSchemaById(Oid psoid); extern ObjectAddress AlterPublicationOwner(const char *name, Oid newOwnerId); -extern void AlterPublicationOwner_oid(Oid subid, Oid newOwnerId); +extern void AlterPublicationOwner_oid(Oid pubid, Oid newOwnerId); extern void InvalidatePublicationRels(List *relids); extern bool pub_rf_contains_invalid_column(Oid pubid, Relation relation, List *ancestors, bool pubviaroot); -- 2.43.0