From 356c3059c872caa401b80b86b2bdf73e70f86c14 Mon Sep 17 00:00:00 2001 From: Artem Fadeev Date: Wed, 14 Jan 2026 15:07:58 +0300 Subject: [PATCH 1/2] [PGPRO-11679] Prepare for Ent optimizer changes New features in PGPRO Enterprise optimizer will change output of EXPLAINs in pg_pathman regression test suite. This commit disables enable_extra_transformations in affected tests to avoid that. --- expected/pathman_only.out | 24 ++++++++++++++++++++++++ expected/pathman_only_1.out | 24 ++++++++++++++++++++++++ expected/pathman_only_2.out | 24 ++++++++++++++++++++++++ expected/pathman_only_3.out | 24 ++++++++++++++++++++++++ expected/pathman_only_4.out | 24 ++++++++++++++++++++++++ expected/pathman_rowmarks.out | 24 ++++++++++++++++++++++++ expected/pathman_rowmarks_1.out | 24 ++++++++++++++++++++++++ expected/pathman_rowmarks_2.out | 24 ++++++++++++++++++++++++ expected/pathman_rowmarks_3.out | 24 ++++++++++++++++++++++++ expected/pathman_rowmarks_4.out | 24 ++++++++++++++++++++++++ expected/pathman_runtime_nodes.out | 24 ++++++++++++++++++++++++ expected/pathman_runtime_nodes_1.out | 24 ++++++++++++++++++++++++ sql/pathman_only.sql | 15 +++++++++++++++ sql/pathman_rowmarks.sql | 15 +++++++++++++++ sql/pathman_runtime_nodes.sql | 16 ++++++++++++++++ 15 files changed, 334 insertions(+) diff --git a/expected/pathman_only.out b/expected/pathman_only.out index f44f2256..b4aacf79 100644 --- a/expected/pathman_only.out +++ b/expected/pathman_only.out @@ -33,6 +33,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); INSERT INTO test_only.from_only_test SELECT generate_series(1, 20); @@ -294,3 +307,14 @@ DROP TABLE test_only.from_only_test CASCADE; NOTICE: drop cascades to 11 other objects DROP SCHEMA test_only; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_only_1.out b/expected/pathman_only_1.out index ce6fd127..895bad5c 100644 --- a/expected/pathman_only_1.out +++ b/expected/pathman_only_1.out @@ -33,6 +33,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); INSERT INTO test_only.from_only_test SELECT generate_series(1, 20); @@ -297,3 +310,14 @@ DROP TABLE test_only.from_only_test CASCADE; NOTICE: drop cascades to 11 other objects DROP SCHEMA test_only; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_only_2.out b/expected/pathman_only_2.out index 6aeadb76..6f1f843a 100644 --- a/expected/pathman_only_2.out +++ b/expected/pathman_only_2.out @@ -33,6 +33,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); INSERT INTO test_only.from_only_test SELECT generate_series(1, 20); @@ -297,3 +310,14 @@ DROP TABLE test_only.from_only_test CASCADE; NOTICE: drop cascades to 11 other objects DROP SCHEMA test_only; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_only_3.out b/expected/pathman_only_3.out index 1999309d..61fd14fa 100644 --- a/expected/pathman_only_3.out +++ b/expected/pathman_only_3.out @@ -33,6 +33,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); INSERT INTO test_only.from_only_test SELECT generate_series(1, 20); @@ -297,3 +310,14 @@ DROP TABLE test_only.from_only_test CASCADE; NOTICE: drop cascades to 11 other objects DROP SCHEMA test_only; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_only_4.out b/expected/pathman_only_4.out index fbcc397c..90366e70 100644 --- a/expected/pathman_only_4.out +++ b/expected/pathman_only_4.out @@ -33,6 +33,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); INSERT INTO test_only.from_only_test SELECT generate_series(1, 20); @@ -297,3 +310,14 @@ DROP TABLE test_only.from_only_test CASCADE; NOTICE: drop cascades to 11 other objects DROP SCHEMA test_only; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_rowmarks.out b/expected/pathman_rowmarks.out index 6d4611ee..0c4c77f4 100644 --- a/expected/pathman_rowmarks.out +++ b/expected/pathman_rowmarks.out @@ -29,6 +29,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); INSERT INTO rowmarks.first SELECT generate_series(1, 10); @@ -408,3 +421,14 @@ drop cascades to table rowmarks.first_4 DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_rowmarks_1.out b/expected/pathman_rowmarks_1.out index 063fca8d..0e0d7b51 100644 --- a/expected/pathman_rowmarks_1.out +++ b/expected/pathman_rowmarks_1.out @@ -29,6 +29,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); INSERT INTO rowmarks.first SELECT generate_series(1, 10); @@ -463,3 +476,14 @@ drop cascades to table rowmarks.first_4 DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_rowmarks_2.out b/expected/pathman_rowmarks_2.out index 91d7804e..1eab1f2d 100644 --- a/expected/pathman_rowmarks_2.out +++ b/expected/pathman_rowmarks_2.out @@ -29,6 +29,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); INSERT INTO rowmarks.first SELECT generate_series(1, 10); @@ -405,3 +418,14 @@ drop cascades to table rowmarks.first_4 DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_rowmarks_3.out b/expected/pathman_rowmarks_3.out index e8644292..32f03105 100644 --- a/expected/pathman_rowmarks_3.out +++ b/expected/pathman_rowmarks_3.out @@ -29,6 +29,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); INSERT INTO rowmarks.first SELECT generate_series(1, 10); @@ -405,3 +418,14 @@ drop cascades to table rowmarks.first_4 DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_rowmarks_4.out b/expected/pathman_rowmarks_4.out index 5fbec84d..7a34e663 100644 --- a/expected/pathman_rowmarks_4.out +++ b/expected/pathman_rowmarks_4.out @@ -29,6 +29,19 @@ SET search_path = 'public'; CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); INSERT INTO rowmarks.first SELECT generate_series(1, 10); @@ -405,3 +418,14 @@ drop cascades to table rowmarks.first_4 DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_runtime_nodes.out b/expected/pathman_runtime_nodes.out index f699ddeb..b937d7b9 100644 --- a/expected/pathman_runtime_nodes.out +++ b/expected/pathman_runtime_nodes.out @@ -3,6 +3,19 @@ SET search_path = 'public'; CREATE SCHEMA pathman; CREATE EXTENSION pg_pathman SCHEMA pathman; CREATE SCHEMA test; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* * Test RuntimeAppend */ @@ -503,3 +516,14 @@ NOTICE: drop cascades to 2 other objects DROP FUNCTION part_test_trigger(); DROP EXTENSION pg_pathman CASCADE; DROP SCHEMA pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/expected/pathman_runtime_nodes_1.out b/expected/pathman_runtime_nodes_1.out index e975c761..ccbf58e0 100644 --- a/expected/pathman_runtime_nodes_1.out +++ b/expected/pathman_runtime_nodes_1.out @@ -3,6 +3,19 @@ SET search_path = 'public'; CREATE SCHEMA pathman; CREATE EXTENSION pg_pathman SCHEMA pathman; CREATE SCHEMA test; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + /* * Test RuntimeAppend */ @@ -503,3 +516,14 @@ NOTICE: drop cascades to 2 other objects DROP FUNCTION part_test_trigger(); DROP EXTENSION pg_pathman CASCADE; DROP SCHEMA pathman; +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + success +--------- + t +(1 row) + diff --git a/sql/pathman_only.sql b/sql/pathman_only.sql index 68dc4ca1..6b224dea 100644 --- a/sql/pathman_only.sql +++ b/sql/pathman_only.sql @@ -37,6 +37,14 @@ CREATE EXTENSION pg_pathman; CREATE SCHEMA test_only; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; /* Test special case: ONLY statement with not-ONLY for partitioned table */ CREATE TABLE test_only.from_only_test(val INT NOT NULL); @@ -95,3 +103,10 @@ WHERE val = (SELECT val FROM ONLY test_only.from_only_test DROP TABLE test_only.from_only_test CASCADE; DROP SCHEMA test_only; DROP EXTENSION pg_pathman; + +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; diff --git a/sql/pathman_rowmarks.sql b/sql/pathman_rowmarks.sql index 8847b80c..c6f981b5 100644 --- a/sql/pathman_rowmarks.sql +++ b/sql/pathman_rowmarks.sql @@ -31,6 +31,14 @@ CREATE EXTENSION pg_pathman; CREATE SCHEMA rowmarks; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; CREATE TABLE rowmarks.first(id int NOT NULL); CREATE TABLE rowmarks.second(id int NOT NULL); @@ -156,3 +164,10 @@ DROP TABLE rowmarks.first CASCADE; DROP TABLE rowmarks.second CASCADE; DROP SCHEMA rowmarks; DROP EXTENSION pg_pathman; + +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; diff --git a/sql/pathman_runtime_nodes.sql b/sql/pathman_runtime_nodes.sql index bf917d88..1928202a 100644 --- a/sql/pathman_runtime_nodes.sql +++ b/sql/pathman_runtime_nodes.sql @@ -4,6 +4,15 @@ CREATE SCHEMA pathman; CREATE EXTENSION pg_pathman SCHEMA pathman; CREATE SCHEMA test; +-- Prevent Ent-specific changes in query plans. Equivalent to +-- "SET enable_extra_transformations = off" but output is +-- edition-independent. +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, 'off', false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; + /* * Test RuntimeAppend */ @@ -370,3 +379,10 @@ DROP FUNCTION part_test_trigger(); DROP EXTENSION pg_pathman CASCADE; DROP SCHEMA pathman; + +-- RESET enable_extra_transformations +SELECT count(*) >= 0 AS success +FROM ( + SELECT set_config(name, NULL, false) FROM pg_settings + WHERE name = 'enable_extra_transformations' +) tmp; From 75478fc455b4b3d525a4c2c3bad57c2c5ba3e2cf Mon Sep 17 00:00:00 2001 From: Artem Fadeev Date: Mon, 19 Jan 2026 13:04:50 +0300 Subject: [PATCH 2/2] [PGPRO-11679] Fix CI on Postgres 14+ Bump clang version on postgres:{14..16}-alpine, where clang15 is absent --- Dockerfile.tmpl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile.tmpl b/Dockerfile.tmpl index ffb67d95..f1094614 100644 --- a/Dockerfile.tmpl +++ b/Dockerfile.tmpl @@ -9,10 +9,13 @@ RUN apk add --no-cache \ coreutils linux-headers \ make musl-dev gcc bison flex \ zlib-dev libedit-dev \ - pkgconf icu-dev clang clang15 clang-analyzer; + pkgconf icu-dev clang clang-analyzer; # Need this for Travis CI to pass -RUN if [ "${PG_VERSION}" == "13" ] ; then apk add --no-cache clang19; fi +RUN if [ "${PG_VERSION}" -ge "13" ] ; \ + then apk add --no-cache clang19; \ + else apk add --no-cache clang15; \ + fi # Install fresh valgrind RUN apk add valgrind \