Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date
Msg-id adJL0oaUR4r2bRLu@paquier.xyz
Whole thread Raw
In response to RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE  ("Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>)
List pgsql-hackers
On Thu, Apr 02, 2026 at 03:20:59AM +0000, Hayato Kuroda (Fujitsu) wrote:
> Thanks for paying attention the thread.
> I've been considering why the XLogFileClose() is slow only on widowbird but I
> have no idea. But on this thread, I think we can just put a workaround for
> stabilization.

I am not convinced that we have a need for an environment variable for
this case, TBH.  It would be enough to make sure that the spawned
worker is paused on its WaitLatch(), with a naptime large enough to
allow the initial transaction to commit, as in the attached.  When the
interruption is run, the worker would stop at CHECK_FOR_INTERRUPTS(),
before beginning a new transaction.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: Better shared data structure management and resizable shared data structures
Next
From: Alvaro Herrera
Date:
Subject: Re: Adding REPACK [concurrently]