Re: Logical replication can lose an update after concurrent index invalidation - Mailing list pgsql-hackers

From vignesh C
Subject Re: Logical replication can lose an update after concurrent index invalidation
Date
Msg-id CALDaNm0bJbB0B3x8k3TV4RhB+02+PHn5EdHBoKWsihuU-7r7sw@mail.gmail.com
Whole thread
In response to Re: Logical replication can lose an update after concurrent index invalidation  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: Logical replication can lose an update after concurrent index invalidation
List pgsql-hackers
On Fri, 18 Sept 2026 at 18:25, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Mon, Sep 7, 2026 at 9:04 PM vignesh C <vignesh21@gmail.com> wrote:
> >
> > On Thu, 3 Sept 2026 at 16:15, Mihail Nikalayeu
> > <mihailnikalayeu@gmail.com> wrote:
> > >
> > > Zhijie, Amit, thanks for the reviews!
> > >
> > > > we shall mention in the comments atop the old function that it should
> > > > not be used in new code anymore
> > >
> > > Done.
> > >
> >
> > Couple of minor comments:
> > 1) I was able to compile without this header inclusion:
> > --- a/src/backend/replication/logical/worker.c
> > +++ b/src/backend/replication/logical/worker.c
> > @@ -249,6 +249,7 @@
> >
> >  #include "access/genam.h"
> >  #include "access/commit_ts.h"
> > +#include "access/htup_details.h"
> >  #include "access/table.h"
> >
>
> Fixed in the attached. Apart from this I changed multiple comments to
> make those clear. One notable change is, I moved the newly added
> boolean after localindexoid as it reads better there because then we
> don't need to forward reference the fields. For back-branches, if it
> needs to be moved to an earlier location then we can do that in those
> versions but for HEAD and 19, the new location seems better.

I felt we will have to use the earlier location in case of
back-branches to avoid offset changing.

> Also, shall we keep just one test, say Drop Index Concurrently instead
> of two as both tests do the same thing in a slightly different way? I
> have not done that but if you agree please update the patch
> accordingly.

Here is an updated version including the back-branches version.
This version also addresses Hou-san's agreed 1st comment from [1].

[1] - https://www.postgresql.org/message-id/CAFvd2n-NBbpLM5yhfxLdmpLy5vshpBNqbJ_vX4cj6Z3Wx5BwFw%40mail.gmail.com

Regards,
Vignesh

Attachment

pgsql-hackers by date:

Previous
From: Sehrope Sarkuni
Date:
Subject: [PATCH] set_byte() with a count argument
Next
From: Aleksander Alekseev
Date:
Subject: Re: Write skew observed under serializable isolation