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

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

> So the attached patch removes the need for a flag, and just relies on
> a plain kill(). Once we do that, the restart time gets effective when
> set.

Thanks, this is basically the same thing I had in mind.

I attached a v3 based with a few changes:

* The docs still said "the postmaster sends a termination signal",
which is no longer true.
* Added Xuneng's doc comment in the test
* I also removed the pid <> $pid condition based on Xuneng's comment
* I changed the max_worker_processes back to total_slots, since that
seem to be more generally used in these functions
* There was a typo in the commit message ("restarted or nor")

Attachment Content-Type Size
v3-0001-Fix-restart-of-interruptible-bgworkers-after-data.patch text/x-patch 8.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ayush Tiwari 2026-11-09 08:49:22 Re: two statement_timeout race conditions
Previous Message Chao Li 2026-11-09 08:42:01 Re: extension_control_path: ignore empty elements and deduplicate directories