Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE

Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>

From: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
To: shveta malik <shveta.malik@gmail.com>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-27T08:36:00Z
Lists: pgsql-hackers

Attachments

Hi,

On Sun, Apr 26, 2026 at 8:45 PM shveta malik <shveta.malik@gmail.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