mirror of https://github.com/citusdata/citus.git
29 Commits (9e42f3f2c41b40f143f594aedb5802402ac58cf7)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
9e42f3f2c4
|
Add PG 18Beta1 compatibility (Build + RuleUtils) (#7981)
This PR provides successful build against PG18Beta1. RuleUtils PR was reviewed separately: #8010 ## PG 18Beta1–related changes for building Citus ### TupleDesc / Attr layout **What changed in PG:** Postgres consolidated the `TupleDescData.attrs[]` array into a more compact representation. Direct field access (tupdesc->attrs[i]) was replaced by the new `TupleDescAttr()` API. **Citus adaptation:** Everywhere we previously used `tupdesc->attrs[...]`, we now call `TupleDescAttr(tupdesc, idx)` (or our own `Attr()` macro) under a compatibility guard. * |
|
|
|
52bf7a1d03 |
Fix ObjectClass declaration for PG17 since it was removed
Relevant PG commit: |
|
|
|
08913e27d7 | PG17 renamed Anum_pg_database_daticulocale to Anum_pg_database_datlocale | |
|
|
3b1c082791 |
Drops PG14 support (#7753)
DESCRIPTION: Drops PG14 support 1. Remove "$version_num" != 'xx' from configure file 2. delete all PG_VERSION_NUM = PG_VERSION_XX references in the code 3. Look at pg_version_compat.h file, remove all _compat functions etc defined specifically for PGXX differences 4. delete all PG_VERSION_NUM >= PG_VERSION_(XX+1), PG_VERSION_NUM < PG_VERSION_(XX+1) ifs in the codebase 5. delete ruleutils_xx.c file 6. cleanup normalize.sed file from pg14 specific lines 7. delete all alternative output files for that particular PG version, server_version_ge variable helps here |
|
|
|
51c2e63c30 |
PG17 compatibility: add COLLPROVIDER_BUILTIN option and fix tests (#7752)
In PG17 adds builtin C.UTF-8 locale option, we add it in the code to avoid "unknown collation provider" in vanilla tests. Relevant PG commit: |
|
|
|
dce54db494 |
PG17 compatibility: Resolve compilation issues (#7699)
This PR provides successful compilation against PG17.0. - Remove ExecFreeExprContext call Relevant PG commit d060e921ea5aa47b6265174c32e1128cebdbc3df |
|
|
|
1d55debb98
|
Support CREATE / DROP database commands from any node (#7359)
DESCRIPTION: Adds support for issuing `CREATE`/`DROP` DATABASE commands from worker nodes With this commit, we allow issuing CREATE / DROP DATABASE commands from worker nodes too. As in #7278, this is not allowed when the coordinator is not added to metadata because we don't ever sync metadata changes to coordinator when adding coordinator to the metadata via `SELECT citus_set_coordinator_host('<hostname>')`, or equivalently, via `SELECT citus_add_node(<coordinator_node_name>, <coordinator_node_port>, 0)`. We serialize database management commands by acquiring a Citus specific advisory lock on the first primary worker node if there are any workers in the cluster. As opposed to what we've done in https://github.com/citusdata/citus/pull/7278 for role management commands, we try to avoid from running into distributed deadlocks as much as possible. This is because, while distributed deadlocks that can happen around role management commands can be detected by Citus, this is not the case for database management commands because most of them cannot be run inside in a transaction block. In that case, Citus cannot even detect the distributed deadlock because the command is not part of a distributed transaction at all, then the command execution might not return the control back to the user for an indefinite amount of time. |
|
|
|
0dac63afc0
|
move pg_version_constants.h to toplevel include (#7335)
In preparation of sorting and grouping all includes we wanted to move this file to the toplevel includes for good grouping/sorting. |
|
|
|
4e46708789
|
Adds PostgreSQL 16.0 Support (#7201)
This commit concludes PG16.0 Support in Citus.
The main PG16 support work has been done for 16beta3
https://github.com/citusdata/citus/pull/6952
There was some extra work needed for 16rc1
https://github.com/citusdata/citus/pull/7173
And this PR yet introduces some extra work needed to 16.0 :)
`pgstat_fetch_stat_local_beentry` has been renamed to
`pgstat_get_local_beentry_by_index` in PG16.0
Relevant PG commit:
|
|
|
|
682dca1f12
|
Adds PG16Beta3 support (#6952)
DESCRIPTION: Adds PG16Beta3 support This is the final commit that adds PG16 compatibility with Citus's current features. You can use Citus community with PG16Beta3. This commit: - Enables PG16 in the configure script. - Adds PG16 tests to CI using test images that have 16beta3 - Skips wal2json cdc test since wal2json package is not available for PG16 yet - Fixes an isolation test Several PG16 Compatibility commits have been merged before this final one. All these subtasks are done https://github.com/citusdata/citus/issues/7017 See the list below: 1 - |
|
|
|
b36c431abb
|
PG16 compatibility - Rework PlannedStmt and Query's Permission Info (#7098)
PG16 compatibility - Part 6 Check out part 1 |
|
|
|
42d956888d
|
PG16 compatibility: Resolve compilation issues (#7005)
This PR provides successful compilation against PG16Beta2. It does some necessary refactoring to prepare for full support of version 16, in https://github.com/citusdata/citus/pull/6952 . Change RelFileNode to RelFileNumber or RelFileLocator Relevant PG commit b0a55e43299c4ea2a9a8c757f9c26352407d0ccc new header for varatt.h Relevant PG commit: d952373a987bad331c0e499463159dd142ced1ef drop support for Abs, use fabs Relevant PG commit 357cfefb09115292cfb98d504199e6df8201c957 tuplesort PGcommit: d37aa3d35832afde94e100c4d2a9618b3eb76472 Relevant PG commit: d37aa3d35832afde94e100c4d2a9618b3eb76472 Fix vacuum in columnar Relevant PG commit: 4ce3afb82ecfbf64d4f6247e725004e1da30f47c older one: b6074846cebc33d752f1d9a66e5a9932f21ad177 Add alloc_flags to pg_clean_ascii Relevant PG commit: 45b1a67a0fcb3f1588df596431871de4c93cb76f Merge GetNumConfigOptions() into get_guc_variables() Relevant PG commit: 3057465acfbea2f3dd7a914a1478064022c6eecd Minor PG refactor PG_FUNCNAME_MACRO __func__ Relevant PG commit 320f92b744b44f961e5d56f5f21de003e8027a7f Pass NULL context to stringToQualifiedNameList, typeStringToTypeName The pre-PG16 error behaviour for the following stringToQualifiedNameList & typeStringToTypeName was ereport(ERROR, ...) Now with PG16 we have this context input. We preserve the same behaviour by passing a NULL context, because of the following: (copy paste comment from PG16) If "context" isn't an ErrorSaveContext node, this behaves as errstart(ERROR, domain), and the errsave() macro ends up acting exactly like ereport(ERROR, ...). Relevant PG commit 858e776c84f48841e7e16fba7b690b76e54f3675 Use RangeVarCallbackMaintainsTable instead of RangeVarCallbackOwnsTable Relevant PG commit: 60684dd834a222fefedd49b19d1f0a6189c1632e FIX THIS: Not implemented grant-level control of role inheritance see PG commit e3ce2de09d814f8770b2e3b3c152b7671bcdb83f Make Scan node abstract PG commit: 8c73c11a0d39049de2c1f400d8765a0eb21f5228 Change in Var representations, get_relids_in_jointree PG commit 2489d76c4906f4461a364ca8ad7e0751ead8aa0d Deadlock detection changes because SHM_QUEUE is removed Relevant PG Commit: d137cb52cb7fd44a3f24f3c750fbf7924a4e9532 TU_UpdateIndexes Relevant PG commit 19d8e2308bc51ec4ab993ce90077342c915dd116 Use object_ownercheck and object_aclcheck functions Relevant PG commits: afbfc02983f86c4d71825efa6befd547fe81a926 c727f511bd7bf3c58063737bcf7a8f331346f253 Rework Permission Info for successful compilation Relevant PG commits: postgres/postgres@a61b1f7 postgres/postgres@b803b7d --------- Co-authored-by: onderkalaci <onderkalaci@gmail.com> |
|
|
|
69af3e8509
|
Drop PG13 Support Phase 2 - Remove PG13 specific paths/tests (#7007)
This commit is the second and last phase of dropping PG13 support.
It consists of the following:
- Removes all PG_VERSION_13 & PG_VERSION_14 from codepaths
- Removes pg_version_compat entries and columnar_version_compat entries
specific for PG13
- Removes alternative pg13 test outputs
- Removes PG13 normalize lines and fix the test outputs based on that
It is a continuation of
|
|
|
|
3200187757
|
Support compilation and run tests on latest PG versions (#6711)
Postgres got minor updates this starts using the images with the latest version for our tests. These new Postgres versions caused a compilation issue in PG14 and PG13 due to some function being backported that we had already backported ourselves. Due this backport being a static inline function it doesn't matter who provides this and there will be no linkage errors when either running old Citus packages on new PG versions or the other way around. |
|
|
|
76ff4ab188
|
Adds support for unlogged distributed sequences (#6292)
We can now do the following:
- Distribute sequence with logged/unlogged option
- ALTER TABLE my_sequence SET LOGGED/UNLOGGED
- ALTER SEQUENCE my_sequence SET LOGGED/UNLOGGED
Relevant PG commit
|
|
|
|
35b4ddc355
|
Pg15 support (#6085)
* Adjust configure script to allow PG15
* Adds copy of ruleutils_14.c as ruleutils_15.c
* Uses get_namespace_name_or_temp in ruleutils_15.c
Relevant PG commit:
48c5c9068211e0a04fd9553c8714b2821ed3ad17
* Clean up code using "(expr) ? true : false" in ruleutils_15.c
Relevant PG commit:
fd0625c7a9c679c0c1e896014b8f49a489c3a245
* Change varno from Index (unsigned int) to int in ruleutils_15.c
Relevant PG commit:
e3ec3c00d85bd2844ffddee83df2bd67c4f8297f
* Adds find_recursive_union to ruleutils_15.c
Relevant PG commit:
3f50b82639637c9908afa2087de7588450aa866b
* Fix display of SQL-std func's args in INSERT/SELECT in ruleutils_15.c
Relevant PG commit:
a8d8445a7b2f80f6d0bfe97b19f90bd2cbef8759
* Fix ruleutils_15.c's dumping of whole-row Vars in more contexts
Relevant PG commit:
43c2175121c829c8591fc5117b725f1f22bfb670
* Fix assorted missing logic for GroupingFunc nodes in ruleutils_15.c
Relevant PG commit:
2591ee8ec44d8cbc8e1226550337a64c684746e4
* Adds grammar support for SQL/JSON clauses in ruleutils_15.c
Relevant PG commit:
f79b803dcc98d707450e158db3638dc67ff8380b
* Adds SQL/JSON constructors to ruleutils_15.c
Relevant PG commits:
f4fb45d15c59d7add2e1b81a9d477d0119a9691a
cc7401d5ca498a84d9b47fd2e01cebd8e830e558
* Adds support for MERGE in ruleutils_15.c
Relevant PG commit:
7103ebb7aae8ab8076b7e85f335ceb8fe799097c
* Add IS JSON predicate to ruleutils_15.c
Relevant PG commit:
33a377608fc29cdd1f6b63be561eab0aee5c81f0
* Add SQL/JSON query functions to ruleutils_15.c
Relevant PG commit:
1a36bc9dba8eae90963a586d37b6457b32b2fed4
* Adds three different SQL/JSON values to ruleutils_15.c
Relevant PG commits:
606948b058dc16bce494270eea577011a602810e
49082c2cc3d8167cca70cfe697afb064710828ca
* Adds JSON table functions in ruleutils_15.c
Relevant PG commit:
4e34747c88a03ede6e9d731727815e37273d4bc9
* Add PLAN function for JSON table in ruleutils_15.c
Relevant PG commit:
fadb48b00e02ccfd152baa80942de30205ab3c4f
* Remove extra blank lines before block-closing braces ruleutils_15.c
Relevant PG commit:
24d2b2680a8d0e01b30ce8a41c4eb3b47aca5031
* set_deparse_plan: Reuse variable to appease Coverity ruleutils_15.c
Relevant PG commit:
e70813fbc4aaca35ec012d5a426706bd54e4acab
* Mechanical code beautification ruleutils_15.c
Relevant PG commit:
23e7b38bfe396f919fdb66057174d29e17086418
* Rename value_type to item_type in ruleutils_15.c
Relevant PG commit:
3ab9a63cb638a1fd99475668e2da9c237495aeda
* Show 'AS "?column?"' explicitly when it's important in ruleutils_15.c
Relevant PG commit:
c7461fc25558832dd347a9c8150b0f1ed85e36e8
* Fix ruleutils_15.c issues with dropped cols in funcs-returning-composite
Relevant PG commit:
c1d1e8469c77ce6b8e5310955580b4a3eee7fe96
* Change comment regarding functions returning composite in ruleutils_15.c
Relevant PG commit:
c2fa113ddb1117b1f03e91960f65d5d7d8a90270
* Replace int nodes with bool nodes where needed
In PG15, Boolean nodes are added. Pre PG15, internal Boolean values
in Create Role commands were represented by Integer nodes. This
commit replaces int nodes logic with bool nodes logic where needed.
Mostly there are CREATE ROLE logic changes.
Relevant PG commit:
941460fcf731a32e6a90691508d5cfa3d1f8eeaf
* Handle new option colliculocale in CREATE COLLATION logic
In PG15, there is an added option to use ICU as global locale provider.
pg_collation has three locale-related fields: collcollate and collctype,
which are libc-related fields, and a new one colliculocale, which is the
ICU-related field. Only the libc-related fields or the ICU-related field
is set, never both.
Relevant PG commits:
f2553d43060edb210b36c63187d52a632448e1d2
54637508f87bd5f07fb9406bac6b08240283be3b
* Add PG15 tests to CI using test images that have 15beta2 (#6093)
* Change warning message in pg_signal_backend()
Relevant PG commit:
7fa945b857cc1b2964799411f1633468826861ff
* Revert "Add missing ifdef for PG 15"
This reverts commit
|
|
|
|
149771792b |
Remove useless version compats
most likely leftover from earlier versions |
|
|
|
7d6410c838
|
Drop postgres 12 support (#6040)
* Remove if conditions with PG_VERSION_NUM < 13 * Remove server_above_twelve(&eleven) checks from tests * Fix tests * Remove pg12 and pg11 alternative test output files * Remove pg12 specific normalization rules * Some more if conditions in the code * Change RemoteCollationIdExpression and some pg12/pg13 comments * Remove some more normalization rules |
|
|
|
184c7c0bce
|
Make enterprise features open source (#6008)
This PR makes all of the features open source that were previously only available in Citus Enterprise. Features that this adds: 1. Non blocking shard moves/shard rebalancer (`citus.logical_replication_timeout`) 2. Propagation of CREATE/DROP/ALTER ROLE statements 3. Propagation of GRANT statements 4. Propagation of CLUSTER statements 5. Propagation of ALTER DATABASE ... OWNER TO ... 6. Optimization for COPY when loading JSON to avoid double parsing of the JSON object (`citus.skip_jsonb_validation_in_copy`) 7. Support for row level security 8. Support for `pg_dist_authinfo`, which allows storing different authentication options for different users, e.g. you can store passwords or certificates here. 9. Support for `pg_dist_poolinfo`, which allows using connection poolers in between coordinator and workers 10. Tracking distributed query execution times using citus_stat_statements (`citus.stat_statements_max`, `citus.stat_statements_purge_interval`, `citus.stat_statements_track`). This is disabled by default. 11. Blocking tenant_isolation 12. Support for `sslkey` and `sslcert` in `citus.node_conninfo` |
|
|
|
a9f8a60007
|
Columnar: support relation options with ALTER TABLE. (#5935)
Columnar: support relation options with ALTER TABLE. Use ALTER TABLE ... SET/RESET to specify relation options rather than alter_columnar_table_set() and alter_columnar_table_reset(). Not only is this more ergonomic, but it also allows better integration because it can be treated like DDL on a regular table. For instance, citus can use its own ProcessUtility_hook to distribute the new settings to the shards. DESCRIPTION: Columnar: support relation options with ALTER TABLE. |
|
|
|
3e1180de78 |
PG15: handle extra argument to parse_analyze_varparams().
From PG commit 25751f54b8. |
|
|
|
b6a5617ea8 |
PG15: handle pg_analyze_and_rewrite_* renaming.
From PG commit 791b1b71da. |
|
|
|
33ee4877d4 |
PG15: rename pgstat_initstats() -> pgstat_init_relation().
From PG commits bff258a273 and be902e2651. |
|
|
|
3799f95742 |
PG15: Value -> String, Integer, Float.
Handle PG commit 639a86e36a. |
|
|
|
26f5e20580 |
PG15: update integer parsing APIs.
Account for PG commits 3c6f8c011f and cfc7191dfe. |
|
|
|
1c1ef7ab8d |
PG15: Handle extra argument to RelationCreateStorage.
Account for PG commit 9c08aea6a309. Introduce RelationCreateStorage_compat. |
|
|
|
f944722c6a |
PG15: Use RelationGetSmgr() instead of RelationOpenSmgr().
Handle PG commit f10f0ae420. |
|
|
|
181111b84f | Drop ruleutils copied for statistics | |
|
|
c9292cfad1
|
Make pg_version_compat.h and listutils.c dependency-free. (#5548)
Split distributed/version_compat.h into dependency-free pg_version_compat.h, and the original which still has dependencies. The original doesn't have much purpose, but until other files have better discipline about including the correct header files, then it's still needed. Also make distributed/listutils.h dependency-free. Should be moved outside of 'distributed' subdirectory, but that will cause significant code churn, so leave for another cleanup patch. Now both files can be included in columnar without creating a dependency on citus. |