Re: Logical replication can lose an update after concurrent index invalidation

From: vignesh C <vignesh21(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Mihail Nikalayeu <mihailnikalayeu(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, onderkalaci(at)gmail(dot)com
Subject: Re: Logical replication can lose an update after concurrent index invalidation
Date: 2026-09-21 08:47:52
Message-ID: CALDaNm2XD8LHQhbW1do3ocpqb0uL-h04vppeJMeL4nz33b0Qbw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 18 Sept 2026 at 18:25, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
> 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.

I also felt one test should be fine.

The patch mostly looks good. I have one small comment: the tests use a
different ordering for wakeup and detach. If we retain the second
test, we could keep the ordering consistent.
+ # Release the worker. The index it holds is no longer the identity.
+ $node_subscriber->safe_psql(
+ 'postgres',
+ "SELECT
injection_points_wakeup('apply-update-before-open-indices');
+ SELECT
injection_points_detach('apply-update-before-open-indices');"
+ );

+ $node_subscriber->safe_psql(
+ 'postgres',
+ "SELECT
injection_points_detach('apply-update-before-open-indices');
+ SELECT
injection_points_wakeup('apply-update-before-open-indices');"
+ );

Regards,
Vignesh

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2026-09-21 08:55:05 Re: pg_walinspect: fix LSN validation messages and empty range handling
Previous Message Daniel Gustafsson 2026-09-21 08:43:26 Re: Serverside SNI support in libpq