Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Aya Iwata (Fujitsu)" <iwata(dot)aya(at)fujitsu(dot)com>
Cc: Peter Smith <smithpb2250(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date: 2026-03-16 23:37:39
Message-ID: abiUQ5MBGG9MDM1h@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Mar 16, 2026 at 04:23:40PM +0900, Michael Paquier wrote:
> Aye, we have a timing issue here, and at first it seemed to me that
> this was a bug in the backend logic. But actually I suspect that it
> is simpler than that: we don't disable autovacuum so couldn't an
> autovacuum worker connect to the database "testdb" that we are trying
> to rename in this query? I cannot be 100% sure because we have
> reduced the log activity for the sake of the tests, but that feels
> possible to me. We could try to disable autovacuum entirely, then see
> if the situation gets better in the buildfarm.
>
> The failure rate is so low that it is likely going to take a few weeks
> to check the stability of the situation. We could also lot more
> things, of course, as a temporary solution.

After sleeping on it, I do not have a better idea than the attached,
so we could always get that into the tree and see if the situation
improves, even if it would take time. Iwata-san and others, what do
you think? Perhaps you could think of a different reason causing this
failure?
--
Michael

Attachment Content-Type Size
worker-spi-test.patch text/plain 564 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-03-16 23:42:44 Re: Flush some statistics within running transactions
Previous Message Daniel Gustafsson 2026-03-16 23:36:11 Re: Changing the state of data checksums in a running cluster