Commit Graph

5748 Commits (9476f377b5799fd3b829dfdfd4cf69abcbcb6adf)

Author SHA1 Message Date
Marco Slot 9476f377b5 Remove old re-partitioning functions 2022-04-04 18:11:52 +02:00
Marco Slot b511e28e80
Merge pull request #5875 from citusdata/marcocitus/tablesample 2022-04-01 16:47:03 +02:00
Marco Slot 8c8c3b665d Add TABLESAMPLE support 2022-04-01 15:51:40 +02:00
Ahmet Gedemenli 5374c771a9
Merge pull request #5872 from citusdata/schema-tests-arbitrary
Add schema tests to arbitrary configs
2022-04-01 16:17:13 +03:00
Ahmet Gedemenli a62de6494d Add schema tests to arbitrary configs 2022-04-01 13:57:17 +03:00
jeff-davis c485a04139
Separate build of citus.so and citus_columnar.so. (#5805)
* Separate build of citus.so and citus_columnar.so.

Because columnar code is statically-linked to both modules, it doesn't
make sense to load them both at once.

A subsequent commit will make the modules entirely separate and allow
loading them both simultaneously.

Author: Yanwen Jin

* Separate citus and citus_columnar modules.

Now the modules are independent. Columnar can be loaded by itself, or
along with citus.

Co-authored-by: Jeff Davis <jefdavi@microsoft.com>
2022-03-31 19:47:17 -07:00
Gledis Zeneli c9aab7fb8b
Add TRUNCATE arbitrary config tests (#5848)
Adds TRUNCATE arbitrary config tests.
Also adds the ability to skip tests from particular configs.
2022-03-31 14:14:47 +03:00
Önder Kalacı a0a2e80c78
Merge pull request #5869 from citusdata/do_not_hide_shards_from_pg
Only hide shards from client backends or non-pg background workers
2022-03-30 17:43:22 +02:00
Onder Kalaci 9043a1ed3f Only hide shards from client backends and pg bg workers
The aim of hiding shards is to hide shards from client applications.

Certain bg workers (such as pg_cron or Citus maintanince daemon)
should be treated like client applications because users can run
queries from such bg workers. And, these bg workers should follow
the similar application_name checks as client backeends.

Certain other bg workers, such as logical replication or postgres'
parallel workers, should never hide shards. They are internal
operations.

Similarly the other backend types like the walsender or
checkpointer or autovacuum should never hide shards.
2022-03-30 16:56:12 +02:00
Ahmet Gedemenli b94422d5cf
Merge pull request #5867 from citusdata/arbitrary-configs-view-test
Add view tests to arbitrary configs
2022-03-30 16:17:31 +03:00
Ahmet Gedemenli f74d3eedc8 Add tests for materialized views 2022-03-30 16:01:11 +03:00
Ahmet Gedemenli 8ef2da8192 Add view tests to arbitrary configs 2022-03-30 12:28:31 +03:00
Önder Kalacı 670fae99f7
Add tests with function dependencies on tables (#5866)
We are not sure if we have such tests, but lets add anyway
2022-03-29 18:04:07 +03:00
Ahmet Gedemenli 1e1e66eeed
Add index tests to arbitrary configs (#5862) 2022-03-29 13:49:05 +03:00
Ahmet Gedemenli b52823f8b4
Fix typo in error message for truncating foreign tables (#5864) 2022-03-29 13:14:16 +03:00
Önder Kalacı 6cb04c0d84
Merge pull request #5865 from citusdata/add_tests_check_mx
add missing check_mx for the schedules
2022-03-29 11:33:42 +02:00
Onder Kalaci 23ff095905 add missing check_mx 2022-03-29 10:35:12 +02:00
Hanefi Onaldi 7dc0a94293
Merge pull request #5852 from citusdata/citus-11.0.0-changelog-1647961698 2022-03-24 16:15:54 +03:00
Hanefi Onaldi 36ca2639f0
Add changelog entry for 11.0.0 2022-03-24 13:48:09 +03:00
Ahmet Gedemenli 6300b86f8a
Merge pull request #5842 from citusdata/drop-pg12-support
Drop PG12 support
2022-03-24 02:31:28 +03:00
Ahmet Gedemenli 42c46a0824 Drop PG12 support 2022-03-23 18:16:04 +03:00
Halil Ozan Akgül 40f3fbbc62
Merge pull request #5819 from citusdata/turn_metadata_sync_on_in_arbitrary_tests
Refactor arbitrary configs to make MX more explicit
2022-03-23 17:44:47 +03:00
Halil Ozan Akgul c843ebe48e Turn metadata sync on in arbitrary config tests 2022-03-23 15:19:52 +03:00
Jelte Fennema 3a44fa827a
Add versions of forboth that don't need ListCell (#5856)
We've had custom versions of Postgres its `foreach` macro which with a
hidden ListCell for quite some time now. People like these custom
macros, because they are easier to use and require less boilerplate.
This adds similar custom versions of Postgres its `forboth` macro. Now
you don't need ListCells anymore when looping over two lists at the same
time.
2022-03-23 14:50:36 +03:00
Ahmet Gedemenli b5448e43e3
Fix aggregate signature bug (#5854) 2022-03-23 13:42:03 +03:00
Burak Velioglu 0c8aca7c5e
Merge pull request #5849 from citusdata/velioglu/support_func
Add support for deparsing ALTER FUNCTION ... SUPPORT ... commands
2022-03-22 22:23:40 +03:00
Burak Velioglu db9f0d926c
Add support for deparsing ALTER FUNCION ... SUPPORT ... commands 2022-03-22 21:55:55 +03:00
Önder Kalacı 0ba334626b
Merge pull request #5851 from citusdata/remove_cte_inline
Remove citus.enable_cte_inlining GUC
2022-03-22 19:09:24 +01:00
Onder Kalaci af4ba3eb1f Remove citus.enable_cte_inlining GUC
In Postgres 12+, users can adjust whether to inline/not inline CTEs
by [NOT] MATERIALIZED keywords. So, this GUC is already useless.
2022-03-22 17:14:44 +01:00
Halil Ozan Akgül 37aefec537
Merge pull request #5847 from citusdata/alter_collation_encoding_does_not_exist_bug
Fixes ALTER COLLATION encoding does not exist bug
2022-03-22 18:30:49 +03:00
Halil Ozan Akgul 4690c42121 Fixes ALTER COLLATION encoding does not exist bug 2022-03-22 17:42:20 +03:00
Marco Slot 9c7fde92b6
Merge pull request #5840 from citusdata/marcocitus/fix-repartition 2022-03-22 13:53:52 +01:00
Marco Slot 32c23c2775 Disallow re-partition joins when no hash function defined 2022-03-22 13:42:53 +01:00
Onur Tirtir 11f246785e
Merge pull request #5836 from citusdata/fix/cannot-distribute-tmp-schemas 2022-03-22 15:30:31 +03:00
Onur Tirtir 11433ed357 Create DDL job for create enum command in postprocess as we do for composite types
Since now we don't throw an error for enums that user attempts creating
in temp schema, the preprocess / DDL job that contains the prepared
statement (to idempotently create the enum type) gets executed. As a
result, we were emitting the following warning because of the error the
underlying worker connection throws:

```sql
WARNING:  cannot PREPARE a transaction that has operated on temporary objects
CONTEXT:  while executing command on localhost:xxxxx
WARNING:  connection to the remote node localhost:xxxxx failed with the following error: another command is already in progress
ERROR:  cannot PREPARE a transaction that has operated on temporary objects
CONTEXT:  while executing command on localhost:xxxxx
```
2022-03-22 15:09:23 +03:00
Onur Tirtir dc31102630 Locally create objects having a dependency that we cannot distribute
We were already doing so for functions & types believing that
this cannot be the case for other object types.

However, as in #5830, we cannot distribute an object that user
attempts creating in temp schema. Even more, this doesn't only
apply to functions and types but also to many other object types.

So with this commit, we teach preprocess/postprocess functions
(that need to create dependencies on worker nodes) how to skip
trying to distribute such objects.

We also start identifying temp schemas as the objects that we
don't know how to propagate to worker nodes so that we can
simply create objects locally if user attempts creating them
in a temp schema.

There are 36 callers of `EnsureDependenciesExistOnAllNodes` in
the codebase atm and for the most we still need to throw a hard
error (i.e.: not use `DeferErrorIfHasUnsupportedDependency`
beforehand), such as:

i) user explicitly wants to create a distributed object
* CreateCitusLocalTable
* CreateDistributedTable
* master_create_worker_shards
* master_create_empty_shard
* create_distributed_function
* EnsureExtensionFunctionCanBeDistributed

ii) we don't want to skip altering distributed table on worker nodes
* PostprocessIndexStmt
* PostprocessCreateTriggerStmt
* PostprocessCreateStatisticsStmt

iii) object is already distributed / handled by Citus before, so we
aren't okay with not propagating the ALTER command
* PostprocessAlterTableSchemaStmt
* PostprocessAlterCollationOwnerStmt
* PostprocessAlterCollationSchemaStmt
* PostprocessAlterDatabaseOwnerStmt
* PostprocessAlterExtensionSchemaStmt
* PostprocessAlterFunctionOwnerStmt
* PostprocessAlterFunctionSchemaStmt
* PostprocessAlterSequenceOwnerStmt
* PostprocessAlterSequenceSchemaStmt
* PostprocessAlterStatisticsSchemaStmt
* PostprocessAlterStatisticsOwnerStmt
* PostprocessAlterTextSearchConfigurationSchemaStmt
* PostprocessAlterTextSearchDictionarySchemaStmt
* PostprocessAlterTextSearchConfigurationOwnerStmt
* PostprocessAlterTextSearchDictionaryOwnerStmt
* PostprocessAlterTypeSchemaStmt
* PostprocessAlterForeignServerOwnerStmt

iv) we already cannot create those objects in temp schemas, so skipping
for now
* PostprocessCreateExtensionStmt
* PostprocessCreateForeignServerStmt

Also note that there are 3 more callers of
`EnsureDependenciesExistOnAllNodes` in enterprise in addition to those
36 but we don't need to do anything specific about them due to the same
reasoning given in iii).
2022-03-22 15:09:23 +03:00
Halil Ozan Akgül 001551d732
Merge pull request #5837 from citusdata/underscore_type_name
Fixes the type names that start with underscore bug
2022-03-22 14:35:55 +03:00
Halil Ozan Akgul 50bace9cfb Fixes the type names that start with underscore bug 2022-03-22 14:24:30 +03:00
Halil Ozan Akgül 98d1018966
Merge pull request #5823 from citusdata/citus_coordinator_node_id
Introduces citus_coordinator_nodeid
2022-03-22 14:23:46 +03:00
Halil Ozan Akgul 4dbc760603 Introduces citus_coordinator_node_id 2022-03-22 10:34:22 +03:00
Hanefi Onaldi 9f204600af
Allow all possible option types for text search objects (#5838) 2022-03-21 20:01:53 +01:00
Halil Ozan Akgül 6c05e4b35c
Add check_mx to operations schedule (#5818) 2022-03-21 19:09:26 +03:00
Burak Velioglu 83b0e98595
Merge pull request #5835 from citusdata/velioglu/poly_aggregate
Add support for zero-argument polymorphic aggregates
2022-03-21 16:22:50 +03:00
Burak Velioglu d4625ec6a1
Add support for zero-argument polymorphic aggregates 2022-03-21 16:10:40 +03:00
Ahmet Gedemenli 46c6630328
Qualify CREATE AGGREGATE stmts in Preprocess (#5834) 2022-03-21 13:55:09 +03:00
Hanefi Onaldi c18c63a930
Merge pull request #5810 from citusdata/changelog-updates 2022-03-19 01:19:53 +03:00
Hanefi Onaldi 44546e9234
Add changelog entries for 10.2.5 2022-03-18 19:48:38 +03:00
Burak Velioglu 2994b10024
Merge pull request #5827 from citusdata/velioglu/local_object_creation
Create type locally if it has undistributable dependency
2022-03-18 18:36:51 +03:00
Burak Velioglu 2c2064bf36
Create type locally if it has undistributable dependency 2022-03-18 18:23:32 +03:00
Marco Slot 0944c631f1
Merge pull request #5824 from citusdata/marcocitus/multi-query-transaction 2022-03-18 16:20:27 +01:00