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.98.2) (envelope-from ) id 1xDgyO-00000000eZA-24oB for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2026 11:35:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xDgyN-00000009l8X-1RSm for pgsql-hackers@arkaria.postgresql.org; Mon, 05 Oct 2026 11:35:11 +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.98.2) (envelope-from ) id 1xDgyM-00000009l8P-3BTD for pgsql-hackers@lists.postgresql.org; Mon, 05 Oct 2026 11:35:11 +0000 Received: from fout-b8-smtp.messagingengine.com ([202.12.124.151]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xDgyJ-00000000W6x-30mu for pgsql-hackers@lists.postgresql.org; Mon, 05 Oct 2026 11:35:10 +0000 Received: from phl-compute-06.internal (phl-compute-06.internal [10.202.2.46]) by mailfout.stl.internal (Postfix) with ESMTP id 0588B1D000D3 for ; Mon, 5 Oct 2026 07:35:04 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-06.internal (MEProxy); Mon, 05 Oct 2026 07:35:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm3; t=1791200104; x= 1791286504; bh=2sFO4mn0gu2eQx6S8u++I5Nfz25y/BoMYcPr33HoBLA=; b=a kwBo5LJgmntIJcKFLC+FQmAz9b5OfWPDY0DZ1pHy50JVj41lxkUKc/7nH9nvecLJ h04jHPH5WAcpltthj9dEjjpaVmazkrELR7Cdct8/X0pm40piAg+k6uoCZl0ouQ7Y dX6eVnPr8TGghKTdOxgnHD2M/TksqQ9WXgi48yGtcGyDdRrwhMh8H+/Ak02RTgny s9h1nPOGlrzl/ZaY9taMWcu7KhoUC8dThJww/28NklW4xzNa2W56dxl22Aqj5zAr LUJPTaUepGvE4wlTL+Jg2QPOMjjm48w7vd2l0q//cVT0E1/TM/sN2CNdM+Kr08Q8 3U9upq8iLa/2Xx/Xwfyfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1791200104; x=1791286504; bh=2 sFO4mn0gu2eQx6S8u++I5Nfz25y/BoMYcPr33HoBLA=; b=jBcCG4vHCevH0s23R vAhWGMDA32/WMzYBJ3kJLwS2xlkpXKdo6SjGdy7wAtI491Rz+//1ISbQ2KKNHK4X Ay2V9kGcZU0fBZ27vPWcnGY8PDgFHXF2NnnezwXyqXBo7ko2aEIUCmpFtpAtFSBw mrNaE7RmsHLNsptVSW2aNKffaIdGM3b0yrfNbT850zPtC1BRIE695n+DlYyuzutH O7KDCMMVMCoNfsrBt++CIbFPOS86MxLi3aho5CSN1XYAIFdlR2kP2Ukktl53v3od qZLG7f5IBh7bt+1scS5pEKdxeToyH0OioQemAn6PLcykBcGTUiL2Ezhd0xXT8EUa bjfQA== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-09-30; sw=lmtpprox; action=sign d=kurilemu.de a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1791200104; d=kurilemu.de; mf=PGFsdmhlcnJlQGt1cmlsZW11LmRlPg==; rt=PHBnc3FsLWhhY2tlcnNAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm3:rsa-sha256:69ivStIF5jUr3Hs/I5DwAnlYVrWN6Y33ilFv1u5MTZJswgj GvG53F49enUFJzZFSj2OtioYpVP6U5clJm/r8e67a/AnHdHXhBVkzArE+yFOcKEz Dttaljmkb6ILIhJGyEMtD001/RXlv44t0AnrUgesA9XPaC4HOdmtoofN3X0BQFa9 I0Bjw8hd2/qvEXFP/7bPSO4+BdyXdJL1U9ZeI8TFsIopppzjkgIkwu9IMw7AAAi8 OK2rPR/sshLrtsmTlV1EAFmhRIA8VUpgamwlpfOS7BeKng6dg13bfq+//6CuJY1B 0fDcwVGCZI9+ivUTH2NwoETAyhcbclDOS+01g+g==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-06; repo=github.com/dkim2wg/interop; date=2026-09-30; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-transfer-encoding, content-type,date,feedback-id,from,in-reply-to,message-id, mime-version,subject,to; Message-Instance: m=1; h=sha256:FTKWbS7RpCyPCE3+paL2CGmM2egDQ8BIrM0FvVYSz5Q=:lEayjfM26SIMYxOD6UfeehyjoVI0+Zp/eOBCL0P6w5A=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTFE/pv5G29qh52vIHGVxGMlaJi1YvUZ8ZI6VR0xo2Dy54PbnIsdxrsOgEFOJuEtU/ 6R9IneqU+zervVGTtlEjIw55ImWYx+0E9vvIDLWWalX8NSxS/tH0wZur/Nu/+drM2SBPen KJ33HoSFa4SyYSMBvL2brKi2XSiotl/DW379UpFxz3cGKpEvIxNqdXE0P9jSqt3NyjETJ2 ekxtNO+GFah5jVc4xesxi0AUOlBBum1nepg5VvgwgXmiIqVXVrlBzZ6aoTS4UIhUljTflT 4QIvqW2GbEF/284Dlpywo63mFPSnhfZaFl1EuWZdNuVWzyLBBwF6VZaajGpdxhvaVV3fdd 15ziG3viBL6MUl6I42r6loZDKtI2x1eY881L/ehAf7VwGPRc5PDI2F8+yOKPUZpG/PMIWY 15hbrwAQBa1jwqIzAHhhX3lycCEit7X86zQ5SmUi3t+BN3SMWo1+PNwmH2/w/G4Ovu2BA/ bJ8X8t7tOnHeBtgiZ+WBsulBRXPRzehHx/qVK7V6FIGDSUJueP9RFoxe85caJ8DSxsZGEO ogkV3tgUQ0DuHY5vKqkv0DUl89TQ/rlLoGDSK0URlcEhynHhbEVrv0jz61sXEbEORkMDW5 RBltwIEVKmK9D1L4h0XyVP3vC9YlOOtbKdM21Brra1KYq39xMPB+uqsC5xyA X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Oct 2026 07:35:03 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1791200100; bh=lEayjfM26SIMYxOD6UfeehyjoVI0+Zp/eOBCL0P6w5A=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=g129/uwRMWbrpGamSCpp31DXCeQLCHb3VvNg3lyn9lrYej7gF6P6AOlczGDjEgbOM Pl2llXDlpCua6ZdTrK9jf9brscAXtdcTmtyC3CvOi8szFyZcPA/zkELCztDVpS3gpa GttP3pNf2EuAifRmeD1/rKU3YRpEHkcS1vVkToMuLhchQWqrJrLz5W3Jo5rN30yX4q 7zlzCNcvRB+l/7HYO8I/MG/tPhpTvbZb0Q+TzxDDz+KG6q+iXiIDM+Mo+Avg8+f+Ju O17OK+pJwrbC/t/4VO2xKMQX7bwwVda9m7ettuZnF2ZMKSPy63d5UB/k6JeaU/lA4X nu36mJ0Gj4Y5g== Received: by ida.kurilemu.internal (Postfix, from userid 1000) id D1F46B0017A; Mon, 05 Oct 2026 13:35:00 +0200 (CEST) Date: Mon, 5 Oct 2026 13:35:00 +0200 From: Alvaro Herrera To: Fujii Masao Cc: Radim Marek , Antonin Houska , PostgreSQL Hackers Subject: Re: REPACK (CONCURRENTLY) might keep dropped-column data Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="hdihf7s7w7rx4v3g" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --hdihf7s7w7rx4v3g Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, On 2026-Oct-05, Fujii Masao wrote: > repack_dropped isolation test should also be listed in Makefile, in > addition to meson.build? Oh, right. > +teardown { > + DROP TABLE repack_dropped; > + DROP FUNCTION repack_dropped_f; > +} > > Should teardown also drop the injection_points extension created by > setup, as the other tests that create the injection_points extension > do? > > This missing DROP seems harmless with the current Meson test order, since > repack_missingval runs next, uses CREATE EXTENSION IF NOT EXISTS, and > then drops the extension. However, that seems fragile. Hmm, agreed, let's do this also. I think the repeated creating/dropping is a bit wasteful though and we don't need it. Wouldn't it make more sense to have all tests use CREATE IF NOT EXISTS and then remove all the DROPs of it? We would end up having the extension after the tests are run, but since the database is specifically created to run the isolation tests, it's not a problem if it remains there. The attached patch would do that. (I am proposing this change just for pg20.) Thanks! -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ --hdihf7s7w7rx4v3g Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename=cine-injpts.patch diff --git a/src/test/modules/injection_points/specs/basic.spec b/src/test/modules/injection_points/specs/basic.spec index 13d2793f6e4..509572ae9ea 100644 --- a/src/test/modules/injection_points/specs/basic.spec +++ b/src/test/modules/injection_points/specs/basic.spec @@ -6,11 +6,7 @@ setup { - CREATE EXTENSION injection_points; -} -teardown -{ - DROP EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; } # Wait happens in the first session, wakeup in the second session. diff --git a/src/test/modules/injection_points/specs/heap_lock_update.spec b/src/test/modules/injection_points/specs/heap_lock_update.spec index b3992a1eb7a..6184ed9f5b7 100644 --- a/src/test/modules/injection_points/specs/heap_lock_update.spec +++ b/src/test/modules/injection_points/specs/heap_lock_update.spec @@ -22,7 +22,7 @@ # output, to verify that the test exercises the scenario we want. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE t (id int PRIMARY KEY); do $$ @@ -43,7 +43,6 @@ setup teardown { DROP TABLE t; - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/inplace.spec b/src/test/modules/injection_points/specs/inplace.spec index 86539a5bd2f..090166ebb0c 100644 --- a/src/test/modules/injection_points/specs/inplace.spec +++ b/src/test/modules/injection_points/specs/inplace.spec @@ -9,7 +9,7 @@ # Just to save on filesystem syscalls, use relkind=c for every other rel. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE SCHEMA vactest; CREATE FUNCTION vactest.mkrels(text, int, int) RETURNS void LANGUAGE plpgsql SET search_path = vactest AS $$ @@ -35,7 +35,6 @@ setup teardown { DROP SCHEMA vactest CASCADE; - DROP EXTENSION injection_points; } # Wait during inplace update, in a VACUUM of vactest.orig50. diff --git a/src/test/modules/injection_points/specs/on_conflict_probe_window.spec b/src/test/modules/injection_points/specs/on_conflict_probe_window.spec index 78dddbe8b92..443a30b217a 100644 --- a/src/test/modules/injection_points/specs/on_conflict_probe_window.spec +++ b/src/test/modules/injection_points/specs/on_conflict_probe_window.spec @@ -13,7 +13,7 @@ setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE probe_a (key int PRIMARY KEY, val int); CREATE TABLE probe_b (key int PRIMARY KEY, val int); INSERT INTO probe_a VALUES (1, 0); @@ -24,7 +24,6 @@ setup teardown { DROP TABLE probe_a, probe_b; - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/reindex_concurrently_deferred.spec b/src/test/modules/injection_points/specs/reindex_concurrently_deferred.spec index 4b95e1da2a7..748b8dee604 100644 --- a/src/test/modules/injection_points/specs/reindex_concurrently_deferred.spec +++ b/src/test/modules/injection_points/specs/reindex_concurrently_deferred.spec @@ -9,7 +9,7 @@ setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE reind_deferred (id int, val int, CONSTRAINT uq_val UNIQUE(val) DEFERRABLE INITIALLY DEFERRED); INSERT INTO reind_deferred VALUES (1, 1), (2, 2); @@ -18,7 +18,6 @@ setup teardown { DROP TABLE reind_deferred; - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/repack.spec b/src/test/modules/injection_points/specs/repack.spec index 7896d1456ad..500140b0fc0 100644 --- a/src/test/modules/injection_points/specs/repack.spec +++ b/src/test/modules/injection_points/specs/repack.spec @@ -1,7 +1,7 @@ # REPACK (CONCURRENTLY) ... USING INDEX ...; setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE repack_test(i int PRIMARY KEY, j int, k int GENERATED ALWAYS AS (j * 2) STORED); @@ -16,7 +16,6 @@ setup teardown { DROP TABLE repack_test; - DROP EXTENSION injection_points; DROP TABLE relfilenodes; DROP TABLE data_s1; diff --git a/src/test/modules/injection_points/specs/repack_commit_race.spec b/src/test/modules/injection_points/specs/repack_commit_race.spec index 9926a45839e..05627fcda82 100644 --- a/src/test/modules/injection_points/specs/repack_commit_race.spec +++ b/src/test/modules/injection_points/specs/repack_commit_race.spec @@ -5,7 +5,7 @@ # for MVCC correctness. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE repack_race(i int PRIMARY KEY, j int); INSERT INTO repack_race(i, j) VALUES (1, 1), (2, 2); @@ -14,7 +14,6 @@ setup teardown { DROP TABLE repack_race; - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/repack_decode.spec b/src/test/modules/injection_points/specs/repack_decode.spec index 04f0df83a0a..522ec41cbac 100644 --- a/src/test/modules/injection_points/specs/repack_decode.spec +++ b/src/test/modules/injection_points/specs/repack_decode.spec @@ -1,6 +1,6 @@ setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; BEGIN; -- Generate a string of random characters that is not likely to be @@ -22,7 +22,6 @@ setup teardown { DROP TABLE repack_toast; - DROP EXTENSION injection_points; DROP FUNCTION gen_external(); SELECT pg_drop_replication_slot('s'); } diff --git a/src/test/modules/injection_points/specs/repack_dropped.spec b/src/test/modules/injection_points/specs/repack_dropped.spec index 099cf744202..784497b0f30 100644 --- a/src/test/modules/injection_points/specs/repack_dropped.spec +++ b/src/test/modules/injection_points/specs/repack_dropped.spec @@ -4,7 +4,7 @@ # they'll comfortably fit in a single page. The OLD tuple 1 is propagated # through the concurrent update because of the trigger. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE repack_dropped (id int PRIMARY KEY, a text, b text); ALTER TABLE repack_dropped ALTER COLUMN b SET STORAGE EXTERNAL; diff --git a/src/test/modules/injection_points/specs/repack_missingval.spec b/src/test/modules/injection_points/specs/repack_missingval.spec index 4b70d810afd..df7b1f8d839 100644 --- a/src/test/modules/injection_points/specs/repack_missingval.spec +++ b/src/test/modules/injection_points/specs/repack_missingval.spec @@ -29,7 +29,6 @@ teardown { DROP TABLE repack_missingval; DROP FUNCTION repack_return_old(); - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/repack_temporal.spec b/src/test/modules/injection_points/specs/repack_temporal.spec index c9fd3f61a84..f29b7e573c4 100644 --- a/src/test/modules/injection_points/specs/repack_temporal.spec +++ b/src/test/modules/injection_points/specs/repack_temporal.spec @@ -6,7 +6,7 @@ # target row. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE repack_temporal ( id int4range, @@ -28,7 +28,6 @@ setup teardown { DROP TABLE repack_temporal; - DROP EXTENSION injection_points; DROP TABLE relfilenodes; } diff --git a/src/test/modules/injection_points/specs/repack_temporal_multirange.spec b/src/test/modules/injection_points/specs/repack_temporal_multirange.spec index 8150c0b4ba8..e1328409a9d 100644 --- a/src/test/modules/injection_points/specs/repack_temporal_multirange.spec +++ b/src/test/modules/injection_points/specs/repack_temporal_multirange.spec @@ -6,7 +6,7 @@ # can produce both as candidates and requires exact recheck. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE repack_temporal_multirange ( id int4multirange, @@ -34,7 +34,6 @@ setup teardown { DROP TABLE repack_temporal_multirange; - DROP EXTENSION injection_points; DROP TABLE relfilenodes; } diff --git a/src/test/modules/injection_points/specs/repack_toast.spec b/src/test/modules/injection_points/specs/repack_toast.spec index bce4d85f4d9..187ba0616e3 100644 --- a/src/test/modules/injection_points/specs/repack_toast.spec +++ b/src/test/modules/injection_points/specs/repack_toast.spec @@ -67,7 +67,6 @@ setup teardown { DROP TABLE repack_toast; - DROP EXTENSION injection_points; DROP FUNCTION gen_compressible(int); DROP FUNCTION gen_compressible_external(int); DROP FUNCTION gen_external(); diff --git a/src/test/modules/injection_points/specs/ri_fastpath_reindex.spec b/src/test/modules/injection_points/specs/ri_fastpath_reindex.spec index bc1ec6e2819..01127c8cf7d 100644 --- a/src/test/modules/injection_points/specs/ri_fastpath_reindex.spec +++ b/src/test/modules/injection_points/specs/ri_fastpath_reindex.spec @@ -1,4 +1,3 @@ -# A foreign key check racing a rebuild of the index it resolves through. # # Pause the RI fast path before it locks the referenced table, allowing # REINDEX CONCURRENTLY to repoint the constraint. Verify that the check @@ -7,7 +6,7 @@ setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE TABLE ri_pk (id int PRIMARY KEY); INSERT INTO ri_pk SELECT g FROM generate_series(1, 100) g; CREATE TABLE ri_fk (id int PRIMARY KEY, pid int REFERENCES ri_pk(id)); @@ -19,7 +18,6 @@ setup teardown { DROP TABLE ri_fk, ri_pk, ri_old_index; - DROP EXTENSION injection_points; } # The rebuild, stopped just before it repoints the constraint. diff --git a/src/test/modules/injection_points/specs/ri_fastpath_snapshot.spec b/src/test/modules/injection_points/specs/ri_fastpath_snapshot.spec index a3cf6c30fb4..8381d441915 100644 --- a/src/test/modules/injection_points/specs/ri_fastpath_snapshot.spec +++ b/src/test/modules/injection_points/specs/ri_fastpath_snapshot.spec @@ -6,7 +6,7 @@ setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE ROLE regress_ri_snapshot; CREATE TABLE ri_snapshot_pk (id int PRIMARY KEY); CREATE TABLE ri_snapshot_fk (pid int); @@ -20,7 +20,6 @@ teardown { DROP TABLE ri_snapshot_fk, ri_snapshot_pk; DROP ROLE regress_ri_snapshot; - DROP EXTENSION injection_points; } session s1 diff --git a/src/test/modules/injection_points/specs/syscache-update-pruned.spec b/src/test/modules/injection_points/specs/syscache-update-pruned.spec index e3a4295bd12..367780eba93 100644 --- a/src/test/modules/injection_points/specs/syscache-update-pruned.spec +++ b/src/test/modules/injection_points/specs/syscache-update-pruned.spec @@ -25,7 +25,7 @@ # on filesystem syscalls, use relkind=c for every other rel. setup { - CREATE EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; CREATE SCHEMA vactest; -- Ensure a leader RELOID catcache entry. PARALLEL RESTRICTED since a -- parallel worker running pg_relation_filenode() would lack that effect. @@ -94,7 +94,6 @@ setup teardown { DROP SCHEMA vactest CASCADE; - DROP EXTENSION injection_points; } # Wait during GRANT. Disable debug_discard_caches, since we're here to diff --git a/src/test/modules/injection_points/specs/wait_cleanup.spec b/src/test/modules/injection_points/specs/wait_cleanup.spec index ed7d21c4de4..beefa4e4a71 100644 --- a/src/test/modules/injection_points/specs/wait_cleanup.spec +++ b/src/test/modules/injection_points/specs/wait_cleanup.spec @@ -5,11 +5,7 @@ setup { - CREATE EXTENSION injection_points; -} -teardown -{ - DROP EXTENSION injection_points; + CREATE EXTENSION IF NOT EXISTS injection_points; } # The first waiter, that gets canceled or terminated. This does not --hdihf7s7w7rx4v3g--