Re: Fix race condition in pg_get_publication_tables with concurrent DROP TABLE
shveta malik <shveta.malik@gmail.com>
From: shveta malik <shveta.malik@gmail.com>
To: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
shveta malik <shveta.malik@gmail.com>
Date: 2026-04-24T07:17:03Z
Lists: pgsql-hackers
On Fri, Apr 24, 2026 at 11:51 AM Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote: > > Hi, > > On Fri, Apr 24, 2026 at 11:19:40AM +0530, shveta malik wrote: > > On Thu, Apr 23, 2026 at 4:45 PM shveta malik <shveta.malik@gmail.com> wrote: > > > > > > On Thu, Apr 23, 2026 at 1:01 AM Bharath Rupireddy > > > <bharath.rupireddyforpostgres@gmail.com> wrote: > > > > > > I tried to find if any other code-part does that, found one refernce > > in hstore_svals(): > > > > /* ugly ugly ugly. why no macro for this? */ > > (funcctx)->call_cntr++; > > > > Having said that, I could not find any other way to implement the fix > > also. > > What about introducing a publication_tables_state struct stored in user_fctx > that carries both the list and a private position index? (kind of what > pg_timezone_abbrevs_zone() is doing). > Yeah, that is a good idea. Seems doable. thanks Shveta