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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Дата
Msg-id acun5kN_JaLFcfq_@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE  (Alexander Lakhin <exclusion@gmail.com>)
Ответы Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Список pgsql-hackers
On Tue, Mar 31, 2026 at 10:00:00AM +0300, Alexander Lakhin wrote:
> So the backend is not completely stuck, but CommitTransactionCommand()
> may take more than 5 seconds under some circumstances (maybe it's worth
> investigating which exactly).

One could blame slow hardware, difficult to say, and I'm puzzled by
these periodic bumps that don't seem to happen elsewhere.  There is at
least one alternative that I can think here to make the test more
stable and make sure that worker_spi reaches its main loop before
attempting the database commands.  We could add a wait_for_event() at
the end of launch_bgworker() based on WorkerSpiMain, and enlarge
worker_spi_naptime to an insanely larger value, to make sure that we
remain on the WaitLatch() until the worker is interrupted and that we
don't attempt a new transaction.
--
Michael

Вложения

В списке pgsql-hackers по дате отправления: