public inbox for [email protected]  
help / color / mirror / Atom feed
From: Zhijie Hou (Fujitsu) <[email protected]>
To: Srinath Reddy Sadipiralla <[email protected]>
Cc: PostgreSQL Hackers <[email protected]>
Subject: RE: Fix race in ReplicationSlotRelease for ephemeral slots
Date: Sat, 30 May 2026 08:14:08 +0000
Message-ID: <TY4PR01MB177180A7CE60BCDF286B1C6F594172@TY4PR01MB17718.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <CAFC+b6o-hD5VxVLZQovmHSYykF8Qzq3eiuBU-U1F_yR9-y6P_w@mail.gmail.com>
References: <TY4PR01MB177184FF9EE916F577E1F554194082@TY4PR01MB17718.jpnprd01.prod.outlook.com>
	<CAFC+b6o-hD5VxVLZQovmHSYykF8Qzq3eiuBU-U1F_yR9-y6P_w@mail.gmail.com>

On Saturday, May 30, 2026 1:44 AM Srinath Reddy Sadipiralla <[email protected]>  wrote:

> > On Wed, May 27, 2026 at 5:20 PM Zhijie Hou (Fujitsu) <mailto:[email protected]> wrote:
> > I haven't attached a test for this fix, as the change is straightforward and the
> > Likelihood of encountering this bug is low, so it may not be worth adding test
> > cycles for it. However, if others feel differently, I'm OK to add one.
>
> +1 for a test. The fix is just an else, so a future refactor could change it and silently
> reintroduce the corruption, since it scribbles on an unrelated reused slot, nothing
> would catch it. Injection points make it deterministic; I've attached a diff patch that adds
> a test that fails without the fix and passes with it.

Thanks for the test.

I'm not sure if adding an injection point for this rare case is worthwhile. Even
if we were to add one, future refactoring of that function could shift the
position of the injection point, so its long-term usefulness is uncertain. I
don't have a strong opinion on this, so I'll leave it to Fujii-San to decide.

Best Regards,
Hou zj




view thread (27+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: RE: Fix race in ReplicationSlotRelease for ephemeral slots
  In-Reply-To: <TY4PR01MB177180A7CE60BCDF286B1C6F594172@TY4PR01MB17718.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox