From 3543a7fe8d19c1b001beb1a0343237e84de8e212 Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Thu, 15 Oct 2026 21:15:11 +0300 Subject: [PATCH 1/3] Update PostgreSQL 19 CI to RC1 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f2aeb1f7-5872-4dc8-a288-2bdafcf80c04 --- .github/workflows/build_and_test.yml | 6 +++--- .github/workflows/nightly_cassert.yml | 6 +++--- src/test/regress/expected/pg19.out | 24 ++++++++++++++++++++++++ src/test/regress/sql/pg19.sql | 18 ++++++++++++++++++ 4 files changed, 48 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index cf63effc07b..3da256ce87b 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -36,11 +36,11 @@ jobs: style_checker_image_name: "ghcr.io/citusdata/stylechecker" style_checker_tools_version: "0.8.33" sql_snapshot_pg_version: "18.6" - image_suffix: "-vb652ec7" + image_suffix: "-dev-b225f84" pg17_version: '{ "major": "17", "full": "17.11" }' pg18_version: '{ "major": "18", "full": "18.6" }' - pg19_version: '{ "major": "19", "full": "19beta4" }' - upgrade_pg_versions: "17.11-18.6-19beta4" + pg19_version: '{ "major": "19", "full": "19rc1" }' + upgrade_pg_versions: "17.11-18.6-19rc1" steps: # Since GHA jobs need at least one step we use a noop step here. - name: Set up parameters diff --git a/.github/workflows/nightly_cassert.yml b/.github/workflows/nightly_cassert.yml index 5e5bf8329ed..bbf69cd82e7 100644 --- a/.github/workflows/nightly_cassert.yml +++ b/.github/workflows/nightly_cassert.yml @@ -7,7 +7,7 @@ run-name: Nightly cassert (${{ github.ref_name }}) # asserts surface -- that is the intended signal, not a regression gate. # # The version matrix lives in the `params` job below (single source of truth, mirroring -# build_and_test.yml's params job, which pins 17.11 / 18.6 / 19beta4 and no longer builds PG16). +# build_and_test.yml's params job, which pins 17.11 / 18.6 / 19rc1 and no longer builds PG16). on: schedule: @@ -34,8 +34,8 @@ jobs: name: Initialize parameters runs-on: ubuntu-latest outputs: - pg_versions: '[{ "major": "17", "full": "17.11" }, { "major": "18", "full": "18.6" }, { "major": "19", "full": "19beta4" }]' - pg_upgrade_pairs: '[{ "old": "17", "old_full": "17.11", "new": "18", "new_full": "18.6" }, { "old": "18", "old_full": "18.6", "new": "19", "new_full": "19beta4" }, { "old": "17", "old_full": "17.11", "new": "19", "new_full": "19beta4" }]' + pg_versions: '[{ "major": "17", "full": "17.11" }, { "major": "18", "full": "18.6" }, { "major": "19", "full": "19rc1" }]' + pg_upgrade_pairs: '[{ "old": "17", "old_full": "17.11", "new": "18", "new_full": "18.6" }, { "old": "18", "old_full": "18.6", "new": "19", "new_full": "19rc1" }, { "old": "17", "old_full": "17.11", "new": "19", "new_full": "19rc1" }]' citus_upgrade_pg: '[{ "major": "17", "full": "17.11" }, { "major": "18", "full": "18.6" }]' citus_old_version: "v14.0.1" # 14.0-1 chains to MASTER (15.0); 14.1 has no path to 15.0 yet steps: diff --git a/src/test/regress/expected/pg19.out b/src/test/regress/expected/pg19.out index c0332de3438..d387585fbf2 100644 --- a/src/test/regress/expected/pg19.out +++ b/src/test/regress/expected/pg19.out @@ -810,6 +810,30 @@ COPY json_copy_dist TO STDOUT (FORMAT json, HEADER true); ERROR: cannot specify HEADER in JSON mode DROP TABLE json_copy_dist, json_copy_empty, json_copy_single_shard, json_copy_reference, json_copy_local, json_copy_citus_local; +-- PG19 RC1 fixed ON CONFLICT inference when an index expression on a NOT NULL +-- column simplifies to that column. Keep the distribution key as a plain index +-- key too, so the unique index is enforceable across shards. +-- PG19 commit: https://github.com/postgres/postgres/commit/f9ccc5e4f92bc39f7c31905ff611785ff29ab9bb +CREATE TABLE on_conflict_nn_expr (a int NOT NULL, b text NOT NULL, payload int); +SELECT create_distributed_table('on_conflict_nn_expr', 'a'); + create_distributed_table +-------------------------- + +(1 row) + +CREATE UNIQUE INDEX on_conflict_nn_expr_idx + ON on_conflict_nn_expr (COALESCE(a, 0), lower(b), a); +INSERT INTO on_conflict_nn_expr VALUES (1, 'Alice', 10); +INSERT INTO on_conflict_nn_expr VALUES (1, 'ALICE', 20) + ON CONFLICT (a int4_ops, lower(b)) + DO UPDATE SET payload = EXCLUDED.payload; +SELECT a, b, payload FROM on_conflict_nn_expr; + a | b | payload +---+-------+--------- + 1 | Alice | 20 +(1 row) + +DROP TABLE on_conflict_nn_expr; SELECT citus_remove_node('localhost', :master_port); citus_remove_node --------------------------------------------------------------------- diff --git a/src/test/regress/sql/pg19.sql b/src/test/regress/sql/pg19.sql index 947da2e885c..f071e349358 100644 --- a/src/test/regress/sql/pg19.sql +++ b/src/test/regress/sql/pg19.sql @@ -593,6 +593,24 @@ COPY json_copy_dist TO STDOUT (FORMAT json, HEADER true); DROP TABLE json_copy_dist, json_copy_empty, json_copy_single_shard, json_copy_reference, json_copy_local, json_copy_citus_local; +-- PG19 RC1 fixed ON CONFLICT inference when an index expression on a NOT NULL +-- column simplifies to that column. Keep the distribution key as a plain index +-- key too, so the unique index is enforceable across shards. +-- PG19 commit: https://github.com/postgres/postgres/commit/f9ccc5e4f92bc39f7c31905ff611785ff29ab9bb +CREATE TABLE on_conflict_nn_expr (a int NOT NULL, b text NOT NULL, payload int); +SELECT create_distributed_table('on_conflict_nn_expr', 'a'); +CREATE UNIQUE INDEX on_conflict_nn_expr_idx + ON on_conflict_nn_expr (COALESCE(a, 0), lower(b), a); + +INSERT INTO on_conflict_nn_expr VALUES (1, 'Alice', 10); +INSERT INTO on_conflict_nn_expr VALUES (1, 'ALICE', 20) + ON CONFLICT (a int4_ops, lower(b)) + DO UPDATE SET payload = EXCLUDED.payload; + +SELECT a, b, payload FROM on_conflict_nn_expr; + +DROP TABLE on_conflict_nn_expr; + SELECT citus_remove_node('localhost', :master_port); RESET client_min_messages; From 7259ac9c94e9a6595eac092b18afc47b69197d4a Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Thu, 15 Oct 2026 21:34:56 +0300 Subject: [PATCH 2/3] Normalize PG19 regression expected output Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f2aeb1f7-5872-4dc8-a288-2bdafcf80c04 --- src/test/regress/expected/pg19.out | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/regress/expected/pg19.out b/src/test/regress/expected/pg19.out index d387585fbf2..6ca3c1f48df 100644 --- a/src/test/regress/expected/pg19.out +++ b/src/test/regress/expected/pg19.out @@ -817,8 +817,8 @@ DROP TABLE json_copy_dist, json_copy_empty, json_copy_single_shard, CREATE TABLE on_conflict_nn_expr (a int NOT NULL, b text NOT NULL, payload int); SELECT create_distributed_table('on_conflict_nn_expr', 'a'); create_distributed_table --------------------------- - +--------------------------------------------------------------------- + (1 row) CREATE UNIQUE INDEX on_conflict_nn_expr_idx @@ -828,8 +828,8 @@ INSERT INTO on_conflict_nn_expr VALUES (1, 'ALICE', 20) ON CONFLICT (a int4_ops, lower(b)) DO UPDATE SET payload = EXCLUDED.payload; SELECT a, b, payload FROM on_conflict_nn_expr; - a | b | payload ----+-------+--------- + a | b | payload +--------------------------------------------------------------------- 1 | Alice | 20 (1 row) From edfc2db4662937f2e334af5e8e314182f658bb56 Mon Sep 17 00:00:00 2001 From: Ibrahim Halatci Date: Fri, 16 Oct 2026 13:44:30 +0300 Subject: [PATCH 3/3] Use stable PostgreSQL 19 RC1 images Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: f2aeb1f7-5872-4dc8-a288-2bdafcf80c04 --- .github/workflows/build_and_test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 3da256ce87b..305c11aa66f 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -36,7 +36,7 @@ jobs: style_checker_image_name: "ghcr.io/citusdata/stylechecker" style_checker_tools_version: "0.8.33" sql_snapshot_pg_version: "18.6" - image_suffix: "-dev-b225f84" + image_suffix: "-va0a5582" pg17_version: '{ "major": "17", "full": "17.11" }' pg18_version: '{ "major": "18", "full": "18.6" }' pg19_version: '{ "major": "19", "full": "19rc1" }'