-
Notifications
You must be signed in to change notification settings - Fork 686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PG17.1 Support - Regression tests sanity #7653
Labels
Comments
naisila
changed the title
PG17Beta2 Support - Regression tests sanity
PG17.0 Support - Regression tests sanity
Nov 10, 2024
colm-mchugh
added a commit
that referenced
this issue
Nov 25, 2024
colm-mchugh
added a commit
that referenced
this issue
Nov 25, 2024
Add an alternative file for columnar_paths. The diff is because of PG17 commit: postgres/postgres@f7816ae which enabled the planner to use statistics to estimate the cardinality of CTE scans. Add a helper function for columnnar_chunk_filtering. The diff is due to: postgres/postgres@fd0398fc which changed how subquery outputs appear in expressions.
colm-mchugh
added a commit
that referenced
this issue
Dec 3, 2024
Add an alternative file for columnar_paths. The diff is because of PG17 commit: postgres/postgres@f7816ae which enabled the planner to use statistics to estimate the cardinality of CTE scans. Add a helper function for columnnar_chunk_filtering. The diff is due to: postgres/postgres@fd0398fc which changed how subquery outputs appear in expressions.
colm-mchugh
added a commit
that referenced
this issue
Dec 3, 2024
This PR fixes diffs in `columnnar_chunk_filtering` and `columnar_paths` tests. In `columnnar_chunk_filtering` an expression `(NOT (SubPlan 1))` changed to `(NOT (ANY (a = (SubPlan 1).col1)))`. This is due to [aPG17 commit](postgres/postgres@fd0398fc) that improved how scalar subqueries (InitPlans) and ANY subqueries (SubPlans) are EXPLAINed in expressions. The fix uses a helper function which converts the PG17 format to the pre-PG17 format. It is done this way because pre-PG17 EXPLAIN does not provide enough context to convert to the PG17 format. The helper function can (and should) be retired when 17 becomes the minimum supported PG. In `columnar_paths`, a merge join changed to a hash join. This is due to [this PG17 commit](postgres/postgres@f7816ae), which improved the PG optimizer's ability to estimate the size of a CTE scan. The impacted query involves a CTE scan with a point predicate `(a=123)` and before the change the CTE size was estimated to be 5000, but with the change it is correctly (given the data in the table) estimated to be 1, making hash join a more attractive join method. The fix is to have an alternative goldfile for pre-PG17. I tried, but was unable, to force a specific kind of join method using the GUCs (`enable_nestloop`, `enable_hashjoin`, `enable_mergejoin`), but it was not possible to obtain a consistent plan across all supported PG versions (in some cases the join inputs switched sides).
colm-mchugh
added a commit
that referenced
this issue
Dec 5, 2024
…ts (#7766) PG17 regress sanity (#7653) fix; address diffs in vanilla tests `create_index` and `privileges`. There is a change from `permission denied` to `must be owner of`, seen in create_index: ``` @@ -2970,21 +2970,21 @@ REINDEX TABLE pg_toast.pg_toast_1260; ERROR: permission denied for table pg_toast_1260 REINDEX INDEX pg_toast.pg_toast_1260_index; -ERROR: permission denied for index pg_toast_1260_index +ERROR: must be owner of index pg_toast_1260_index ``` and privileges: ``` @@ -2945,41 +2945,43 @@ ERROR: permission denied for table maintain_test REINDEX INDEX maintain_test_a_idx; -ERROR: permission denied for index maintain_test_a_idx +ERROR: must be owner of index maintain_test_a_idx REINDEX SCHEMA reindex_test; REINDEX INDEX maintain_test_a_idx; +ERROR: must be owner of index maintain_test_a_idx REINDEX SCHEMA reindex_test; ``` The fix updates function `RangeVarCallbackForReindexIndex()` in `index.c` with changes made by the introduction of the [MAINTAIN privilege in PG17](https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=ecb0fd337) to the function `RangeVarCallbackForReindexIndex()` in `indexcmds.c`. The code is under a Postgres 17 version directive, which can be removed when 17 becomes the oldest supported Postgres version.
naisila
changed the title
PG17.0 Support - Regression tests sanity
PG17.1 Support - Regression tests sanity
Dec 23, 2024
naisila
changed the title
PG17.1 Support - Regression tests sanity
PG17 Support - Regression tests sanity
Dec 23, 2024
naisila
changed the title
PG17 Support - Regression tests sanity
PG17.1 Support - Regression tests sanity
Dec 23, 2024
All these issues have been fixed in https://github.com/citusdata/citus/tree/naisila/pg17_support branch. That branch will soon be merged into |
naisila
added a commit
that referenced
this issue
Dec 24, 2024
This is the final commit that adds PG17 compatibility with Citus's current capabilities. You can use Citus community, release-13.0 branch, with PG17.1. --------- Specifically, this commit: - Enables PG17 in the configure script. - Adds PG17 tests to CI using test images that have 17.1 - Fixes an upgrade test: see below for details In `citus_prepare_upgrade()`, don't drop any_value when upgrading from PG16+, because PG16+ has its own any_value function. Attempting to do so results in the error seen in [pg16-pg17 upgrade](https://github.com/citusdata/citus/actions/runs/11768444117/job/32778340003?pr=7661): ``` ERROR: cannot drop function any_value(anyelement) because it is required by the database system CONTEXT: SQL statement "DROP AGGREGATE IF EXISTS pg_catalog.any_value(anyelement)" ``` When 16 becomes the minimum supported Postgres version, the drop statements can be removed. --------- Several PG17 Compatibility commits have been merged before this final one. All these subtasks are done #7653 See the list below: Compilation PR: #7699 Ruleutils PR: #7725 Sister PR for tests: citusdata/the-process#159 Helpful smaller PRs: - #7714 - #7726 - #7731 - #7732 - #7733 - #7738 - #7745 - #7747 - #7748 - #7749 - #7752 - #7755 - #7757 - #7759 - #7760 - #7761 - #7762 - #7765 - #7766 - #7768 - #7769 - #7771 - #7774 - #7776 - #7780 - #7781 - #7785 - #7788 - #7793 - #7796 --------- Co-authored-by: Colm <colmmchugh@microsoft.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Using the PG17 support branch, for now we have the following failing regression tests:
multi-1
schedule: 0/214 tests failingmulti
schedule: 0/181 tests failingmulti-mx
schedule: 0/68 tests failingenterprise
schedule: 0/31 tests failingcolumnar
schedule: 0/43 tests failingisolation
schedule: 0/94 tests failingarbitrary-configs
schedules: 0/29 tests failingvanilla
schedule: 0/221 tests failingPR to keep track of tests: #7661
See below a list of all current issues. Please put your PR or branch if you are currently working in an issue.
PG17 compatibility: fix pg16 to pg17 upgrade #7788
multi_alter_table_add_constraints_without_name
PG17 compatibility: Fix Test Failure in multi_alter_table_add_const #7733
must be owner of
topermission denied
, seen inisolation_multiuser_locking
A new test output file may be required because with MAINTAIN privilege
must be owner of
is not an applicable error message in pg17. Sopermission denied
is the correct error message for pg 17. Fix Isolation Test Failure in isolation_multiuser_locking in PG17 #7714 covers it, but that PR may no longer be applicable (?)WHERE true
changed toWHERE (key OPERATOR(pg_catalog.=) 5)
, seen inlocal_table_join
,local_dist_join_mixed
PG17 compatibility: Fix Test Failure in local_dist_join_mixed #7731
PG17 compatibility: Fix Test Failure in local_table_join #7732
isolation_progress_monitoring
testPG17 compatibility: ensure get_progress() output is consistent #7793
ERROR: table "partitioned_table_1_50" being attached contains an identity column "a"
, seen ingenerated_identity
PG17 compatibility: account for identity columns in partitioned tables. #7785
Hash Left Join
changed toNested Loop Left Join
,Hash
changed toMaterialize
, seen inmulti_explain
PG17 compatibility: fix plan diffs in multi_explain #7780
ERROR: malformed array literal: ""
, seen incheck_mx
Has to do with previous failing tests in
check-enterprise
. Note that thecheck_mx
test passes inmulti-1
scheduleFixed by fixing other tests
DEBUG: drop auto-cascades to type multi_router_planner.pg_temp_61381
, seen inmulti_router_planner
,multi_router_planner_fast_path
,multi_mx_router_planner
PG17 compatibility: fix multi-1 diffs caused by PG17 optimizer enhancements #7769
multi_multiuser_master_protocol
PG17 compatibility: account for MAINTAIN privilege in regress tests #7774
shard_move_constraints_blocking
Looks like this is now fixed ? enterprise schedule runs without any test fails (Colm)
Probably fixed by MAINTAIN fixes.
ERROR: node with node id 35 could not be found
, probably originating from previous errors though, seen inshard_move_constraints_blocking
,logical_rep_consistency
Probably fixed by MAINTAIN fixes.
router planner does not support queries that reference non-colocated distributed tables
orfound no worker with all shard placements
changed toLocal tables cannot be used in distributed queries.
, seen inquery_single_shard_table
PG17 compatibility: fix multi-1 diffs caused by PG17 optimizer enhancements #7769
Router planner cannot handle multi-shard select queries
, seen inmulti_router_planner
,multi_router_planner_fast_path
PG17 compatibility: fix multi-1 diffs caused by PG17 optimizer enhancements #7769
ERROR: unrecognized aclright: 16384
, seen ingenerated_identity
,create_single_shard_table
,grant_on_sequence_propagation
,grant_on_foreign_server_propagation
,single_node_enterprise
,multi_multiuser_master_protocol
,multi_alter_table_row_level_security
,shard_move_constraints
This also leads to
ERROR: replication_factor (2) exceeds number of worker nodes (1)
seen ingrant_on_schema_propagation
PG17 compatibility: Fix
ERROR: unrecognized aclright: 16384
, seen ingenerated_identity
, and other tests. #7773PG17 compatibility: account for MAINTAIN privilege in regress tests #7774
ERROR: unrecognized ALTER DATABASE option: tablespace
, seen indatabase
vanilla test #7763Fix bug: alter database shouldn't propagate for undistributed database #7777
jsonb_jsonpath
vanilla testFixed by Postgres 17.1
permission denied
tomust be owner of
, and vice versa, seen increate_index
,privileges
vanilla tests andisolation_multiuser_locking
PG17 compatibility: fix diffs in create_index, privileges vanilla tests #7766
columnar_paths
PG17 compatibility (#7653): Fix test diffs in columnar schedule #7768
columnar_chunk_filtering
PG17 compatibility (#7653): Fix test diffs in columnar schedule #7768
stat_statements
PG17 compatibility: fix some tests outputs #7765
ERROR: cannot push down subquery on the target list
and newERROR: column ref_3.domain_default does not exist
, seen inissue_5248
PG17 compatibility: fix some tests outputs #7765
tableam
PG17 compatibility: fix diff in tableam #7771
multi_create_table_constraints
,multi_name_lengths
PG17 compatibility: Fix Test Failure in multi_name_lengths multi_create_table_constraints #7726
DEBUG: query has a single distribution column value: 1
, seen incte_inline
#7754PG17 compatibility: Preserve DEBUG output in cte_inline #7755
alter_index
,pg13_propagate_statistics
PG17 compatibility: Fix Test Failure in pg13_propagate_statistics #7748
PG17 compatibility: Fix Test Failure in alter_index #7749
multi
schedule stuck atdrop_column_partitioned_table
test,multi-mx
schedule stuck atstart_stop_metadata_sync
test,columnar
schedule stuck atcolumnar_create
test, timeout issuefixed by PG17 compatibility - Check if there are blocks left in columnar_scan_analyze_next_block #7738
vanilla
schedule: 50/222 tests failing, dropped to 4/222 failingcrashes fixed by PG17 compatibility: Check whether table AM is default #7747
vanilla
schedule: 4/222 tests failing, dropped to 2/222 failingfixed by PG17 compatibility: add COLLPROVIDER_BUILTIN option and fix tests #7752
ERROR: complex joins are only supported when all distributed tables are co-located and joined on their distribution columns
, seen indml_recursive
,union_pushdown
PG17 compatibility: add/fix tests with correlated subqueries that can be pulled to a join #7745
PG17 regress test sanity: fix diffs in union_pushdown. #7762
ERROR: cannot push down this subquery
seen inset_operations
PG17 compatibility: add/fix tests with correlated subqueries that can be pulled to a join #7745
ERROR: correlated subqueries are not supported when the FROM clause contains a CTE or subquery
, could be the same issue as the above, seen insubquery_in_where
PG17 compatibility: add/fix tests with correlated subqueries that can be pulled to a join #7745
multi_explain
,multi_subquery
,multi_reference_table
,having_subquery
,ch_bench_having
,multi_reference_table
,ch_bench_having_mx
#7756PG17 compatibility: add helper function for EXPLAIN diffs in scalar subquery output #7757
ERROR: COPY delimiter character must not appear in the DEFAULT specification
, seen inpg16
PG17 compatibility: Normalize COPY error messages #7759
multi_mx_hide_shard_names
PG17 compatibility: fix backend type orders in test #7760
public.citus_tables[]
, seen inmulti_extension
,upgrade_list_citus_objects
PG17 compatibility: Adjust print_extension_changes function for extra type outputs in PG17 #7761
PG17 compatibility: Adjust print_extension_changes function for extra type outputs in PG17 #7761
test_index_1130000
entries when querying pg_class, seen inmulti_mx_hide_shard_names
I don't see this failure anymore ?
MERGE
issues:merge
:Fix HideCitusDependentObjectsOnQueriesOfPgMetaTables function #7796
pg15
,pgmerge
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
ERROR: updating the distribution column is not allowed in MERGE actions
, seen inmerge
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
ERROR: The required join operation is missing between the target's distribution column and any expression originating from the source. The issue may arise from a non-equi-join.
, probably same as above, seen inmerge
,merge_repartition2
,merge_repartition1
,merge_schema_sharding
,merge_partition_tables
,merge_vcore
,merge_arbitrary
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
ERROR: cannot execute MERGE on relation "tv"
for views, seen inpgmerge
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
ERROR: syntax error at or near "RETURNING"
, seen inpgmerge
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
ERROR: The average of pg_target.id is less than citus_target.id
, seen inmerge_repartition2
,merge_repartition1
Support PostgreSQL 17 MERGE features in Citus with clean exceptions #7781
📘 probably originating from the same PG commit
🟪 probably originating from the same PG commit
🟨 probably originating from new MAINTAIN thing
installcheck
schedule failing, cdc_wal2json test fails because wal2json package is not available yet for pg17for now, fixed by citusdata/the-process@16d4616
EDIT: now wal2json package is available for pg17.
The text was updated successfully, but these errors were encountered: