public inbox for [email protected]  
help / color / mirror / Atom feed
From: Aya Iwata (Fujitsu) <[email protected]>
To: 'Michael Paquier' <[email protected]>
To: Peter Smith <[email protected]>
Cc: Pavel Stehule <[email protected]>
Cc: Chao Li <[email protected]>
Cc: Hayato Kuroda (Fujitsu) <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date: Fri, 13 Mar 2026 11:38:51 +0000
Message-ID: <OS3PR01MB8889505E2F3E443CCA4BD72EEA45A@OS3PR01MB8889.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <OS7PR01MB119648203BD748ED008FA5BF5EAABA@OS7PR01MB11964.jpnprd01.prod.outlook.com>
	<CAFj8pRCn0=jn4yaeg1JoxxxnUNeXm1KCouES8Puq_GgBsXrNTQ@mail.gmail.com>
	<OS7PR01MB1196405302B700736580DEE49EAA8A@OS7PR01MB11964.jpnprd01.prod.outlook.com>
	<CAFj8pRBk7zTKoxAAKAihNQuimztniWHPyRWHKp2iHq_2hH+dvQ@mail.gmail.com>
	<OS7PR01MB11964C83E8E543743581250B0EAB3A@OS7PR01MB11964.jpnprd01.prod.outlook.com>
	<CAHut+PvP6H2soK05c_0JZC8--=h4nWEtxYE_nJGjRkQr=25F1w@mail.gmail.com>
	<[email protected]>
	<CAHut+PtSVYKU4vfaRev4FMdbeZ3ukvxRy4X7uK05jv_9WMYafA@mail.gmail.com>
	<OS7PR01MB1196426354C0294148A06AC65EA86A@OS7PR01MB11964.jpnprd01.prod.outlook.com>
	<CAHut+PtZh+B_-z_TzmToUhL4-sBrf7dfH0uAb7VU-jkXFmHQSA@mail.gmail.com>
	<[email protected]>

Hi

On March 10th, the bgworker test "t/002_worker_terminate.pl" failed on the Build Farm.
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=jay&dt=2026-03-10%2019%3A26%3A19

We are currently attempting to reproduce this issue and are considering a fix.

According to the log, the test failed because the bgworker cannot be terminated
within the time frame (5 seconds) when ALTER DATABASE RENAME is executed.

So I suspect that there is a lock conflict.

Log of Build Farm;
2026-03-10 21:08:33.103 CET [28076:4] 002_worker_terminate.pl LOG:  statement: ALTER DATABASE testdb RENAME TO renameddb
2026-03-10 21:08:34.578 CET [28071:2] FATAL:  terminating background worker "worker_spi dynamic" due to administrator command
2026-03-10 21:08:38.109 CET [28076:5] 002_worker_terminate.pl ERROR:  database "testdb" is being accessed by other users
2026-03-10 21:08:38.109 CET [28076:6] 002_worker_terminate.pl DETAIL:  There is 1 other session using the database.
2026-03-10 21:08:38.109 CET [28076:7] 002_worker_terminate.pl STATEMENT:  ALTER DATABASE testdb RENAME TO renameddb
2026-03-10 21:08:38.229 CET [28076:8] 002_worker_terminate.pl LOG:  disconnection: session time: 0:00:05.129 user=buildfarm database=postgres host=[local]
2026-03-10 21:08:38.231 CET [28025:6] LOG:  background worker "worker_spi dynamic" (PID 28071) exited with exit code 1
2026-03-10 21:08:38.234 CET [28025:7] LOG:  received immediate shutdown request
2026-03-10 21:08:38.241 CET [28025:8] LOG:  database system is shut down

If there is a lock conflict, we will come up with a solution.

Regards,
Aya Iwata





view thread (70+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
  In-Reply-To: <OS3PR01MB8889505E2F3E443CCA4BD72EEA45A@OS3PR01MB8889.jpnprd01.prod.outlook.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox