public inbox for [email protected]  
help / color / mirror / Atom feed
From: Michael Paquier <[email protected]>
To: Aya Iwata (Fujitsu) <[email protected]>
Cc: 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: Tue, 17 Mar 2026 08:37:39 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <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]>
	<OS3PR01MB8889505E2F3E443CCA4BD72EEA45A@OS3PR01MB8889.jpnprd01.prod.outlook.com>
	<[email protected]>

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

diff --git a/src/test/modules/worker_spi/t/002_worker_terminate.pl b/src/test/modules/worker_spi/t/002_worker_terminate.pl
index 6d3794355981..21dfb5961289 100644
--- a/src/test/modules/worker_spi/t/002_worker_terminate.pl
+++ b/src/test/modules/worker_spi/t/002_worker_terminate.pl
@@ -59,6 +59,10 @@ sub run_bgworker_interruptible_test
 
 my $node = PostgreSQL::Test::Cluster->new('mynode');
 $node->init;
+$node->append_conf(
+	"postgresql.conf", qq(
+autovacuum = off
+));
 $node->start;
 
 # Check if the extension injection_points is available, as it may be


Attachments:

  [text/plain] worker-spi-test.patch (564B, 2-worker-spi-test.patch)
  download | inline diff:
diff --git a/src/test/modules/worker_spi/t/002_worker_terminate.pl b/src/test/modules/worker_spi/t/002_worker_terminate.pl
index 6d3794355981..21dfb5961289 100644
--- a/src/test/modules/worker_spi/t/002_worker_terminate.pl
+++ b/src/test/modules/worker_spi/t/002_worker_terminate.pl
@@ -59,6 +59,10 @@ sub run_bgworker_interruptible_test
 
 my $node = PostgreSQL::Test::Cluster->new('mynode');
 $node->init;
+$node->append_conf(
+	"postgresql.conf", qq(
+autovacuum = off
+));
 $node->start;
 
 # Check if the extension injection_points is available, as it may be


  [application/pgp-signature] signature.asc (833B, 3-signature.asc)
  download

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: <[email protected]>

* 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