Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: shveta malik <shveta(dot)malik(at)gmail(dot)com>
Cc: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE
Date: 2026-04-27 08:36:00
Message-ID: CALj2ACWLYK6Yx3oh-B4v+_PkKbDQBpmG3oy9dJQMqLJ1QYxXJw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Sun, Apr 26, 2026 at 8:45 PM shveta malik <shveta(dot)malik(at)gmail(dot)com> wrote:
>
> > I prefer adding the new struct to carry both table_infos and the
> > current index into it with the current value-per-call SRF function,
> > unless others have better ideas.
>
> +1. It is simpler than the Materialization concept.
>
> > If okay, I will send a new patch
> > soon. Thank you!
>
> Sure, Thanks!

Attached v2 patch. I also refactored the test a bit. Please review. Thank you!

I added this to the current CF: https://commitfest.postgresql.org/patch/6715/.

--
Bharath Rupireddy
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v2-0001-Fix-race-condition-in-pg_get_publication_tables-w.patch application/octet-stream 7.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message SATYANARAYANA NARLAPURAM 2026-04-27 08:41:18 [Patch]: Fix excessive ProcArrayLock acquisitions with subscription max_retention_duration=0
Previous Message Nisha Moond 2026-04-27 08:28:58 Re: [PATCH] Fix Int32GetDatum used for bool column in CREATE SUBSCRIPTION