Commit Graph

5728 Commits (42c46a08240044fcf33b5e799307b1be8769c2d0)

Author SHA1 Message Date
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
Marco Slot 055bbd6212 Use coordinated transaction when there are multiple queries per task 2022-03-18 15:04:27 +01:00
Marco Slot a1108d2a20
Merge pull request #5828 from citusdata/marcocitus/fix-lock 2022-03-18 14:46:38 +01:00
Marco Slot cab243218d Avoid locks in relation_is_a_known_shard 2022-03-18 14:37:39 +01:00
Marco Slot eeafa67bea
Merge pull request #5816 from citusdata/marcocitus/fix-type 2022-03-17 13:50:41 +01:00
Marco Slot 5bb5359da0 Fix worker node version check 2022-03-17 13:23:02 +01:00
Marco Slot 22a18fc1f2 Fix typo in upgrade function 2022-03-17 13:23:02 +01:00
Jelte Fennema 68bfc8d1c0
Use good initdb options in arbitrary configs tests (#5802)
In `pg_regress_multi.pl` we're running `initdb` with some options that
the `common.py` `initdb` is currently not using. All these flags seem
reasonable, so this brings `common.py` in line with
`pg_regress_multi.pl`.

In passing change the `--nosync` flag to `--no-sync`, since that's what
the PG documentation lists as the official option name (but both work).
2022-03-17 13:22:23 +01:00
Jelte Fennema b0e406a478
Disable ddl propagation when creating users in arbitrary config tests (#5814)
This should help with failing enterprise tests.
2022-03-16 15:12:20 +01:00
Ahmet Gedemenli eddfea18c2
Fix role creation issue on schema tests (#5812) 2022-03-16 13:49:28 +01:00
Burak Velioglu e21980fb89
Merge pull request #5809 from citusdata/velioglu/unmark_deps_on_worker
Drop distributed table on worker with ProcessUtilityParseTree
2022-03-15 17:59:22 +03:00
Burak Velioglu 333c73a53c
Drop distributed table on worker with ProcessUtilityParseTree 2022-03-15 17:42:01 +03:00
Gledis Zeneli 56ab64b747
Patches #5758 with some more error checks (#5804)
Add error checks to detect failed connection and don't ping secondary nodes to detect self reference.
2022-03-15 15:02:47 +03:00
Marco Slot 5fd0ec7dab
Merge pull request #5801 from citusdata/marcocitus/row-share-lock 2022-03-15 11:00:04 +01:00
Hanefi Onaldi c0cd8f3d56 Wait until metadata sync before testing distributed sequences 2022-03-15 10:28:51 +01:00
Marco Slot e42a798707 Always use RowShareLock in pg_dist_node when syncing metadata 2022-03-15 10:28:51 +01:00
Ahmet Gedemenli 36b33e2491
Add sequence tests to arbitrary config (#5771)
Add sequence tests to arbitrary config (#5771)
2022-03-14 19:16:24 +03:00
Jelte Fennema 41c6393e82
Parallelize cluster setup in arbitrary config tests (#5738)
Cluster setup time is significant in arbitrary configs. We can
parallelize this a bit more.

Runtime of the following command decreases from ~25 seconds to ~22
seconds on my machine with this change:

```
make -C src/test/regress/ check-arbitrary-base CONFIGS=CitusDefaultClusterConfig EXTRA_TESTS=prepared_statements_1
```

Currently we can only run different configs in parallel. However, when working on a feature or trying to fix a bug this is not important. In those cases you simply want to run a single test file on a single config. And you want to run that every time you made a change to the code that you think fixes the issue.

This PR allows parallelising running of bash commands. So `initdb` and `pg_ctl start` is run in parallel for all nodes in the cluster. Instead of one waiting for the other.

When you run the above command nothing is being run in parallel.

After this PR, cluster setup is being run in parallel.
2022-03-14 16:42:20 +01:00
Jelte Fennema 5063257252
Disable fsync in arbitrary config tests (#5800)
We have fsync enabled for regular tests already in `pg_regress_multi.pl`.
This does the same for the arbitrary config tests.

On my machine this changes the runtime from the following command from
~37 to ~25 seconds:

```bash
make -C src/test/regress/ check-arbitrary-configs CONFIGS=CitusDefaultClusterConfig
```
2022-03-14 18:12:38 +03:00
Marco Slot 5d07273ca6
Merge pull request #5466 from citusdata/improve_error_msgs 2022-03-14 15:23:41 +01:00
Onder Kalaci 338752d96e Guard against hard wait event set errors
Similar to https://github.com/citusdata/citus/pull/5158, but this
time instead of the executor, use this in all the remaining places.
2022-03-14 14:35:56 +01:00