Re: Fix 035_standby_logical_decoding.pl race conditions

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Cc: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix 035_standby_logical_decoding.pl race conditions
Date: 2025-04-08 06:27:41
Message-ID: Z_TB3dKdfgpOLzB1@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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, including both
Postgres-specific calls as well as system calls. strcmp() and
strlcpy() are still OK-ish, even as system calls, as they work
directly on the strings given in input.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2025-04-08 06:29:42 Re: pg16 && GSSAPI && Heimdal/Macos
Previous Message Andres Freund 2025-04-08 06:22:22 Re: Fix 035_standby_logical_decoding.pl race conditions