Re: Fix 035_standby_logical_decoding.pl race conditions - Mailing list pgsql-hackers

From Bertrand Drouvot
Subject Re: Fix 035_standby_logical_decoding.pl race conditions
Date
Msg-id Z/TFbWvjIGwsw5Hk@ip-10-97-1-34.eu-west-3.compute.internal
Whole thread Raw
In response to Re: Fix 035_standby_logical_decoding.pl race conditions  (Michael Paquier <michael@paquier.xyz>)
Responses Re: Fix 035_standby_logical_decoding.pl race conditions
List pgsql-hackers
Hi,

On Tue, Apr 08, 2025 at 03:27:41PM +0900, Michael Paquier wrote:
> On Tue, Apr 08, 2025 at 06:19:02AM +0000, Bertrand Drouvot wrote:
> > - A new injection_points_wakeup_detach() function that is holding the spinlock
> > during the whole duration to ensure that no process can wait in between the
> > wakeup and the detach.
> 
> That would not a correct spinlock use.  injection_points_detach() and
> injection_points_wakeup_internal() do much more actions than what we
> can internally do while holding a spinlock,

Fully agree. Will need to find another way to prevent a process to wait between the
wakeup and the detach. I'll open a dedicated thread.

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Add pg_buffercache_evict_all() and pg_buffercache_mark_dirty[_all]() functions
Next
From: "Zhijie Hou (Fujitsu)"
Date:
Subject: RE: BUG #18815: Logical replication worker Segmentation fault