Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7XNv-005QB2-1s for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 11:35:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7XNt-009tnR-37 for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 11:35:50 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1w7XNt-009tnI-27 for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 11:35:50 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1w7XNp-00000002AGe-1OV8 for pgsql-hackers@postgresql.org; Tue, 31 Mar 2026 11:35:47 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id 08ED1562086 for ; Tue, 31 Mar 2026 13:35:45 +0200 (CEST) Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id E92C8561541; Tue, 31 Mar 2026 13:35:44 +0200 (CEST) Received: from localhost (unknown [172.22.191.5]) by s981.loopia.se (Postfix) with ESMTP id E515522B17D9; Tue, 31 Mar 2026 13:35:44 +0200 (CEST) X-Virus-Scanned: amavis at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s473.loopia.se (amavis); dkim=pass (2048-bit key) header.d=yesql.se Received: from s981.loopia.se ([172.22.191.6]) by localhost (s473.loopia.se [172.22.190.13]) (amavis, port 10024) with UTF8LMTP id Zw2Ds-JqpKj4; Tue, 31 Mar 2026 13:35:43 +0200 (CEST) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s981.loopia.se (Postfix) with ESMTPSA id 66ECF22B17EB; Tue, 31 Mar 2026 13:35:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1774956943; bh=pM7Xe7s4lBlj0zyIWoTpnVS8L7T/p8o0mWrjB1odFjU=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=BBGu+e0uMlQi31+2xDbtEP3OwpSRYIQWlYlao5zFG7KX4rVDlDIIRnODlRDnS7/v0 ZnRe8uw78oEGtNHOnZqXF8VpCKZdF3olroSCm8eRUjb2z82YWYH1+Ko9w9r3SQIHbY s9nzb6MXxwMJ3mGFOQPx/nY389zEuSYEvM94rIxO+ySPqYkhWroGZDJvDpXRDw0bA9 oouZnYY1z1WesUrXFnjUYaCz4nWg8fXA2hz6rYQa48t1cTvLIS8cxdpWML7gdEiICj RzKoDldrfmpNKTEHjThjD7MO7EtLKWmmqYkPaNHqGNSv4g6zvpa3dwxdOaULDlrJYL kvmuSkA7wm5SQ== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: Eliminating SPI / SQL from some RI triggers - take 3 From: Daniel Gustafsson In-Reply-To: Date: Tue, 31 Mar 2026 13:35:33 +0200 Cc: Junwang Zhao , Chao Li , Haibo Yan , Pavel Stehule , PostgreSQL Hackers , Tomas Vondra Content-Transfer-Encoding: quoted-printable Message-Id: References: <2BE661BA-D909-4093-BF78-DB9B0C099337@gmail.com> <77FA04FE-1F84-4DA1-8855-8BBFD8CC889A@gmail.com> <5761CE63-06B8-49D9-BAF4-D921F64F18B1@yesql.se> To: Amit Langote X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On 31 Mar 2026, at 13:26, Amit Langote = wrote: >=20 > On Tue, Mar 31, 2026 at 8:22=E2=80=AFPM Daniel Gustafsson = wrote: >>> On 31 Mar 2026, at 12:57, Junwang Zhao wrote: >>=20 >>> prion is happy now, the fix works, thanks. >>=20 >> The widowbird failure seems to be SPI related as well, relevant = portion of log >> below. Is that the same or another error? >=20 > prion was unhappy about something else, which I've fixed: > = https://www.postgresql.org/message-id/E1w7U6V-002H6n-0o%40gemulon.postgres= ql.org >=20 > Though, I'm not sure if or why the fix is now the reason for > widowbird's failure. >=20 >> echo "# +++ tap install-check in src/test/modules/worker_spi +++" && = rm -rf = '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_sp= i'/tmp_check && /usr/bin/mkdir -p = '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_sp= i'/tmp_check && cd . && = TESTLOGDIR=3D'/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modu= les/worker_spi/tmp_check/log' = TESTDATADIR=3D'/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/mod= ules/worker_spi/tmp_check' = PATH=3D"/mnt/data/buildfarm/buildroot/HEAD/inst/bin:/mnt/data/buildfarm/bu= ildroot/HEAD/pgsql.build/src/test/modules/worker_spi:$PATH" = PGPORT=3D'65678' = top_builddir=3D'/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/mo= dules/worker_spi/../../../..' = PG_REGRESS=3D'/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modu= les/worker_spi/../../../../src/test/regress/pg_regress' = share_contrib_dir=3D'/mnt/data/buildfarm/buildroot/HEAD/inst/share/postgre= sql/extension' /usr/bin/prove -I ../../../../src/test/perl/ -I . t/*.pl >> # +++ tap install-check in src/test/modules/worker_spi +++ >> t/001_worker_spi.pl ........ ok >> # Tests were run but no plan was declared and done_testing() was not = seen. >> # Looks like your test exited with 29 just after 8. >> t/002_worker_terminate.pl .. >> Dubious, test returned 29 (wstat 7424, 0x1d00) >> All 8 subtests passed >>=20 >> Test Summary Report >> ------------------- >> t/002_worker_terminate.pl (Wstat: 7424 (exited 29) Tests: 8 Failed: = 0) >> Non-zero exit status: 29 >> Parse errors: No plan found in TAP output >> Files=3D2, Tests=3D16, 28 wallclock secs ( 0.08 usr 0.01 sys + 6.63 = cusr 2.93 csys =3D 9.65 CPU) >> Result: FAIL >> make[1]: *** [../../../../src/makefiles/pgxs.mk:439: installcheck] = Error 1 >> make[1]: Leaving directory = '/mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_sp= i' >> make: *** [Makefile:87: installcheck-worker_spi-recurse] Error 2 >> log files for step testmodules-install-check-en_GB.UTF-8: >=20 > Not sure what's going on here or how it's related to 68a8601ee. Not sure either, I just saw SPI when digging and wanted to check, but I = agree that it doesn't seem related. More log excerpts: [11:15:49.966](3.762s) ok 1 - dynamic bgworker 0 launched [11:15:50.372](0.407s) ok 2 - background worker blocked the database = creation [11:15:50.413](0.041s) ok 3 - background worker is still running after = CREATE DATABASE WITH TEMPLATE [11:15:50.663](0.250s) ok 4 - dynamic bgworker 1 launched [11:15:51.085](0.421s) ok 5 - dynamic bgworker stopped for CREATE = DATABASE WITH TEMPLATE [11:15:51.264](0.179s) ok 6 - dynamic bgworker 2 launched [11:15:51.438](0.175s) ok 7 - dynamic bgworker stopped for ALTER = DATABASE RENAME [11:15:51.655](0.216s) ok 8 - dynamic bgworker 3 launched error running SQL: 'psql::1: ERROR: database "renameddb" is being = accessed by other users DETAIL: There is 1 other session using the database.' while running 'psql --no-psqlrc --no-align --tuples-only --quiet = --dbname port=3D17048 host=3D/mnt/data/buildfarm/buildroot/tmp/Li3aVcqeUa = dbname=3D'postgres' --file - --variable ON_ERROR_STOP=3D1' with sql = 'ALTER DATABASE renameddb SET TABLESPACE test_tablespace' at = /mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi= /../../../../src/test/perl/PostgreSQL/Test/Cluster.pm line 2335. # Postmaster PID for node "mynode" is 792281 ### Stopping node "mynode" using mode immediate # Running: pg_ctl --pgdata = /mnt/data/buildfarm/buildroot/HEAD/pgsql.build/src/test/modules/worker_spi= /tmp_check/t_002_worker_terminate_mynode_data/pgdata --mode immediate = stop waiting for server to shut down...... done server stopped # No postmaster PID for node "mynode" [11:16:02.658](11.003s) # Tests were run but no plan was declared and = done_testing() was not seen. [11:16:02.659](0.001s) # Looks like your test exited with 29 just after = 8. 2026-03-31 11:15:51.686 UTC [792340:4] 002_worker_terminate.pl LOG: = statement: ALTER DATABASE renameddb SET TABLESPACE test_tablespace 2026-03-31 11:15:51.687 UTC [792340:5] 002_worker_terminate.pl DEBUG: = attempting worker termination for database 16413 2026-03-31 11:15:51.687 UTC [792340:6] 002_worker_terminate.pl DEBUG: = termination requested for worker (PID 792336) on database 16413 2026-03-31 11:15:51.787 UTC [792340:7] 002_worker_terminate.pl DEBUG: = attempting worker termination for database 16413 2026-03-31 11:15:51.787 UTC [792340:8] 002_worker_terminate.pl DEBUG: = termination requested for worker (PID 792336) on database 16413 2026-03-31 11:15:51.887 UTC [792340:9] 002_worker_terminate.pl DEBUG: = attempting worker termination for database 16413 2026-03-31 11:15:51.887 UTC [792340:10] 002_worker_terminate.pl DEBUG: = termination requested for worker (PID 792336) on database 16413 <-- snip --> 2026-03-31 11:15:57.088 UTC [792340:102] 002_worker_terminate.pl DEBUG: = termination requested for worker (PID 792336) on database 16413 2026-03-31 11:15:57.188 UTC [792340:103] 002_worker_terminate.pl DEBUG: = attempting worker termination for database 16413 2026-03-31 11:15:57.188 UTC [792340:104] 002_worker_terminate.pl DEBUG: = termination requested for worker (PID 792336) on database 16413 2026-03-31 11:15:57.288 UTC [792340:105] 002_worker_terminate.pl ERROR: = database "renameddb" is being accessed by other users 2026-03-31 11:15:57.288 UTC [792340:106] 002_worker_terminate.pl DETAIL: = There is 1 other session using the database. 2026-03-31 11:15:57.288 UTC [792340:107] 002_worker_terminate.pl = STATEMENT: ALTER DATABASE renameddb SET TABLESPACE test_tablespace 2026-03-31 11:15:57.289 UTC [792340:108] 002_worker_terminate.pl LOG: = disconnection: session time: 0:00:05.611 user=3Dbuildfarm = database=3Dpostgres host=3D[local] 2026-03-31 11:15:57.300 UTC [792281:23] LOG: received immediate shutdown = request 2026-03-31 11:15:57.300 UTC [792281:24] DEBUG: updating PMState from = PM_RUN to PM_WAIT_BACKENDS 2026-03-31 11:16:02.309 UTC [792281:25] LOG: issuing SIGKILL to = recalcitrant children 2026-03-31 11:16:02.547 UTC [792281:26] DEBUG: updating PMState from = PM_WAIT_BACKENDS to PM_WAIT_DEAD_END 2026-03-31 11:16:02.547 UTC [792281:27] DEBUG: updating PMState from = PM_WAIT_DEAD_END to PM_NO_CHILDREN 2026-03-31 11:16:02.574 UTC [792281:28] LOG: database system is shut = down -- Daniel Gustafsson