Re: [BUG]Invalidate relcache when setting REPLICA IDENTITY
Amit Kapila <amit.kapila16@gmail.com>
From: Amit Kapila <amit.kapila16@gmail.com>
To: Euler Taveira <euler@eulerto.com>
Cc: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>, "tanghy.fnst@fujitsu.com" <tanghy.fnst@fujitsu.com>
Date: 2021-11-13T10:49:41Z
Lists: pgsql-hackers
Attachments
- v7-0001-Invalidate-relcache-when-changing-REPLICA-IDENTIT.patch (application/octet-stream) patch v7-0001
On Sat, Nov 13, 2021 at 12:47 AM Euler Taveira <euler@eulerto.com> wrote: > > On Fri, Nov 12, 2021, at 3:10 AM, houzj.fnst@fujitsu.com wrote: > > On Fri, Nov 12, 2021 1:33 PM Amit Kapila <amit.kapila16@gmail.com> wrote: > > On Fri, Nov 12, 2021 at 10:50 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > > But won't that generate invalidation for the rel twice in the case > > > (change Replica Identity from Nothing to some index) you mentioned in > > > the previous email? > > > > > > > Oh, I see the point. I think this is okay because > > AddRelcacheInvalidationMessage doesn't allow to add duplicate rel > > invalidation. If that is the case I wonder why not simply register > > invalidation without any check in the for loop as was the case with > > Tang's original patch? > > OK, I also think the code in Tang's original patch is fine. > Attach the patch which register invalidation without any check in the for loop. > > WFM. > The patch looks mostly good to me. I have slightly tweaked the comments in the code (as per my previous suggestion) and test. Also, I have slightly modified the commit message. If the attached looks good to you then kindly prepare patches for back-branches. -- With Regards, Amit Kapila.
Commits
-
Invalidate relcache when changing REPLICA IDENTITY index.
- 2c0443c59570 10.20 landed
- 40fb634b1a7b 11.15 landed
- 9816e2d31826 12.10 landed
- 63c3eeddc2db 13.6 landed
- 232fd72a5eab 14.2 landed
- 354a1f8d220f 15.0 landed