diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index cf63effc07b..305c11aa66f 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: "-va0a5582" 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..6ca3c1f48df 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;