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: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: shveta malik <shveta.malik@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-28T14:17:00Z
Lists: pgsql-hackers

Attachments

Hi,

On Mon, Apr 27, 2026 at 10:54 PM Bertrand Drouvot
<bertranddrouvot.pg@gmail.com> wrote:
>
> > Sure. How about pg-get-publication-tables-after-list-built? It's 42
> > bytes, under the INJ_NAME_MAXLEN of 64 bytes, but meaningful.
>
> That looks ok to me.
>
> Just still 2 minor comments:
>
> 1/
> +       # Drop the table while the SRF is paused.
>
> s/the SRF/ pg_get_publication_tables()/ ?
>
> 2/
>
> +# pg_get_publication_tables race with concurrent DROP TABLE.
>
> What about describing a bit more the bug? The other tests in 100_bugs.pl describe
> the bug they're testing.

Please find the attached v4 patch. Thank yoU!

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