public inbox for [email protected]
help / color / mirror / Atom feedFrom: [email protected] <[email protected]>
To: Önder Kalacı <[email protected]>
To: Amit Kapila <[email protected]>
Cc: Peter Smith <[email protected]>
Cc: vignesh C <[email protected]>
Cc: [email protected] <[email protected]>
Cc: Marco Slot <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
Date: Tue, 14 Mar 2023 06:01:11 +0000
Message-ID: <OSZPR01MB63109BF76F51A5EB3BAE3884FDBE9@OSZPR01MB6310.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CACawEhXKejUH7eozjnDxi_VfZ8fahjQehpV315vBUFy3yDfFhQ@mail.gmail.com>
References: <CAA4eK1+0zu9dCTCTSh92rLYtGY_B6EkGWzDAn9+SK2DHGodHgA@mail.gmail.com>
<CACawEhXKejUH7eozjnDxi_VfZ8fahjQehpV315vBUFy3yDfFhQ@mail.gmail.com>
On Mon, Mar 13, 2023 10:16 PM Önder Kalacı <[email protected]> wrote:
>
> Attaching v47.
>
Thanks for updating the patch. Here are some comments.
1.
in RemoteRelContainsLeftMostColumnOnIdx():
+ if (indexInfo->ii_NumIndexAttrs < 1)
+ return false;
Did you see any cases that the condition is true? I think there is at least one
column in the index. If so, we can use an Assert().
+ if (attrmap->maplen <= AttrNumberGetAttrOffset(keycol))
+ return false;
Similarly, I think `attrmap->maplen` is the number of columns and it is always
greater than keycol. If you agree, we can check it with an Assert(). Besides, It
seems we don't need AttrNumberGetAttrOffset().
2.
+# make sure that the subscriber has the correct data after the update UPDATE
"update UPDATE" seems to be a typo.
3.
+# now, drop the index with the expression, and re-create index on column lastname
The comment says "re-create index on column lastname" but it seems we didn't do
that, should it be modified to something like:
# now, drop the index with the expression, we will use sequential scan
Besides these, the patch LGTM.
Regards,
Shi Yu
view thread (49+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher
In-Reply-To: <OSZPR01MB63109BF76F51A5EB3BAE3884FDBE9@OSZPR01MB6310.jpnprd01.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox