Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Xuneng Zhou <xunengzhou(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Michael Paquier <michael(at)paquier(dot)xyz>
Subject: Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE
Date: 2026-11-07 08:26:42
Message-ID: CAN4CZFPJ5BAk+v3-KAz703tTjkRSTeC_8nKKuBkTMkMRXz=rQw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 07 Nov 2026, Xuneng Zhou <xunengzhou(at)gmail(dot)com> wrote:
> In theory, there seems to be a PID reuse race between finding the workers
> and sending the signal. But this risk is accepted and considered as too
> rare in practice to bother in pg_signal_backend() and
> terminateOtherDBBackends().

Yes, that's why I went with the interrupted flag. I can attach a
version that terminates them directly instead, if that is acceptable.
My logic was that if this gets committed before the 19 release, the
additional flag shouldn't be an issue and it's a better solution.

> Do we need to add it to the open issue list though it might already be on
> Michael's radar?

I included Michael in the thread, but yes, I think it's also a good
idea to add it there.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Jones 2026-11-07 08:48:24 Re: XMLDocument (SQL/XML X030)
Previous Message Xuneng Zhou 2026-11-07 08:14:03 Re: BGWORKER_INTERRUPTIBLE workers are never restarted after DROP/ALTER/CREATE DATABASE