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

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Iwata, Aya/岩田 彩 <iwata(dot)aya(at)fujitsu(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, Kuroda, Hayato/黒田 隼人 <kuroda(dot)hayato(at)fujitsu(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date: 2026-04-02 11:26:32
Message-ID: 1b796dc7-a873-4249-8c35-7ea7b9772904@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/2/26 06:00, Alexander Lakhin wrote:
> Hello Tom and Tomas,
>
> 01.04.2026 23:20, Tom Lane wrote:
>> Alexander Lakhin <exclusion(at)gmail(dot)com> writes:
>>> I think this can explain slow CommitTransactionCommand() and why it
>>> happens not every time. Regarding other animals, I guess they can
>>> experience the same bumps but not exceeding 5 seconds (50 tries). Thus,
>>> from my understanding, for the failure to happen, we need to have slow
>>> storage and initialize_worker_spi() -> CommitTransactionCommand() reaching
>>> XLogFileClose().
>> So, it remains not very clear why only widowbird is showing this
>> failure, but I think we can safely take away the bottom-line
>> conclusion that hard-wiring a maximum wait of 5s in
>> CountOtherDBBackends() was not a great idea.
>
> There also were two failures from jay: [1], [2], but yes, widowbird is
> getting more and more consistent in that aspect: [3], probably because
> of the storage (SD card?) degradation.
>

Jay is a regular machine, 2-core VM hosted at a university, so not very
powerful but was running for years just fine and seems to be healthy.

> Tomas, maybe you could check if the write speed is more or less acceptable
> there?
>

Will do. I'll wait for the tests to complete on widowbird, and will do
some testing on the storage (it's running from a flash drive, not SD
card, and I saw stuff in dmesg when it was dying in the past - but now
it's clean).

regards

--
Tomas Vondra

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2026-04-02 11:36:25 Re: pg_waldump: support decoding of WAL inside tarfile
Previous Message Etsuro Fujita 2026-04-02 11:14:37 Re: [PATCH] analyze: move elevel calculation into do_analyze_rel()