Commit Graph

4538 Commits (d0317ec4d069980e26f5582f10c546d54d096142)

Author SHA1 Message Date
Hadi Moshayedi d0317ec4d0
Merge pull request #4618 from citusdata/fix_4608 2021-02-01 20:17:37 -08:00
Hadi Moshayedi bcb162976f Fix #4608 2021-02-01 16:23:16 -08:00
Hadi Moshayedi 877d87e372
Merge pull request #4610 from citusdata/fix_4600
Columnar: Fix lateral joins
2021-02-01 12:09:28 -08:00
Hadi Moshayedi f5b1e49b79 Columnar: Fix lateral joins 2021-02-01 11:59:36 -08:00
Hadi Moshayedi e2afbc9283
Merge pull request #4607 from citusdata/fix_4602
Columnar: Fix ALTER TABLE ... ADD COLUMN.
2021-02-01 11:51:04 -08:00
Hadi Moshayedi ef927688fa Columnar: Fix ALTER TABLE ... ADD COLUMN. 2021-02-01 11:40:17 -08:00
Brian Bergeron 1253eeb9ff
Don't propagate ALTER ROLE SET when scoped to a different database (#4471)
Co-authored-by: brberger <brberger@microsoft.com>
2021-02-01 15:49:26 +03:00
Hanefi Onaldi 31763ef079
Merge pull request #4410 from citusdata/fix-shardid-in-partition-constraints
fix_partition_constraints() goes over all partitioned distributed tables and renames
constraint names to their original values.

fix_partition_constraints(partitioned_dist_table) goes over all shard placements of a
partitioned distributed table and sends worker_fix_partition_constraints(...) to workers
in a distributed transaction.

worker_fix_partition_constraints(partitioned_dist_table, shardId, constraintName) checks
if a shardId is appended to a constraint, and removes that suffix with an
ALTER TABLE .. RENAME CONSTRAINT command.
2021-01-29 17:46:42 +03:00
Hanefi Önaldı cab17afce9 Introduce UDFs for fixing partitioned table constraint names 2021-01-29 17:32:20 +03:00
Hanefi Önaldı 92cf49b7e9 Limit shardId in partitioned table constraint names to only CHECK 2021-01-29 17:29:53 +03:00
SaitTalhaNisanci 738825cc38
Fix partition column index issue (#4591)
* Fix partition column index issue

We send column names to worker_hash/range_partition_table methods, and
in these methods we check the column name index from tuple descriptor.
Then this index is used to decide the bucket that the current row will
be sent for the repartition.

This becomes a problem when there are the same column names in the
tupleDescriptor. Then we can choose the wrong index. Hence the
partitioned data will be put to wrong workers. Then the result could
miss some data because workers might contain different range of data.

An example:
TupleDescriptor contains "trip_id", "car_id", "car_id" for one table.
It contains only "car_id" for the other table. And assuming that the
tables will be partitioned by car_id, it is not certain what should be
used for deciding the bucket number for the first table. Assuming value
2 goes to bucket 2 and value 3 goes to bucket 3, it is not certain which
bucket "1 2 3" (trip_id, car_id, car_id)  row will go to.

As a solution we send the index of partition column in targetList
instead of the column name.

The old API is kept so that if workers upgrade work, it still works
(though it will have the same bug)

* Use the same method so that backporting is easier
2021-01-29 14:40:40 +03:00
SaitTalhaNisanci 1ba399f5ca
Fix a flaky behaviour in shared_connection_stats (#4596)
With the previous query, we were not pushing down the pg_sleep hence the
number of connections to a worker could be different from run to run.
2021-01-28 18:42:49 +03:00
Önder Kalacı 34ccae8478
Merge pull request #4588 from citusdata/copy_fix_connection
When reaches to pool size, COPY sets the placement access
2021-01-28 13:08:47 +01:00
Onder Kalaci c7ea46067f Add regression tests 2021-01-28 12:45:57 +01:00
Onder Kalaci 04fcd73eb6 When reaches to shared pool size, COPY sets the placement access
It looks like we forgot to set the placement accesses, and
this could lead to self-deadlocks on complex transaction blocks.
2021-01-28 12:45:57 +01:00
Onder Kalaci 36bdeef1bb When reaches to executor pool size, COPY sets the placement access
It looks like we forgot to set the placement accesses, and
this could lead to self-deadlocks on complex transaction blocks.
2021-01-28 12:45:57 +01:00
Onur Tirtir bb5962ee79
Early error out when creating citus local from a temp table (#4592) 2021-01-28 14:18:06 +03:00
Halil Ozan Akgül e96db9b407
Merge pull request #4581 from citusdata/error-for-alter-table-am-pg11
Adds error message to AlterTableSetAccessMethod for below PG12
2021-01-28 12:30:38 +03:00
Halil Ozan Akgul 913aa91449 Adds error message to AlterTableSetAccessMethod for below PG12 2021-01-28 11:32:02 +03:00
jeff-davis 15297cab49
Columnar: add GUC to control qual pushdown. (#4586) 2021-01-27 09:57:40 -08:00
jeff-davis 62e0383150
Columnar readme. (#4585)
Co-authored-by: Jeff Davis <jefdavi@microsoft.com>
2021-01-27 09:33:35 -08:00
Nils Dijk 07d3b4fd04
fix NaN cost estimate on empty columnar tables (#4593)
Fixing a division by zero in the cost calculations for scanning a columnar table.

Due to how the columns in a columnar table are counted an empty table would result in a division by zero. Instead this patch keeps the column selection ratio on zero when this happens, resulting in an accurate cost of zero pages to scan a columnar table.

fixes #4589
2021-01-27 17:32:17 +01:00
Nils Dijk 07cf037b13
fix parse error on pg11.8 for extension creation (#4582)
In pg11.8 it seemingly tries to parse the full sql file creating the extension,
since we use syntax introduced in postgres 12 this fails.

This patch rewrites the statement not recognized by pg11.8 to be dynamically
executed from a string literal via `EXECUTE`.
2021-01-27 17:00:29 +01:00
Onur Tirtir b20615cbbe
Advise dropping foreign key in addition to create_reference_table hint (#4590) 2021-01-27 17:59:06 +03:00
Onur Tirtir a18d4288e9
Merge pull request #4573 from citusdata/rename-create_citus_local_table
Rename create_citus_local_table to citus_add_local_table_to_metadata
2021-01-27 17:45:46 +03:00
Onur Tirtir 8151c4b443 Merge remote-tracking branch 'origin/master' into rename-create_citus_local_table 2021-01-27 17:08:58 +03:00
Ahmet Gedemenli 1c7ee10de2
Merge pull request #4584 from citusdata/fix-dropping-mat-views-when-alter-table
Fix dropping materialized views while doing alter table
2021-01-27 17:01:39 +03:00
Ahmet Gedemenli b2c1bbddd4
Merge branch 'master' into fix-dropping-mat-views-when-alter-table 2021-01-27 16:33:10 +03:00
Ahmet Gedemenli 35043c56f1 Fix dropping materialized views while doing alter table 2021-01-27 16:32:09 +03:00
Onur Tirtir 93a83d5472 Rename create_citus_local_table.c to citus_add_local_table_to_metadata.c 2021-01-27 15:52:37 +03:00
Onur Tirtir dfcdccd0e7 Rename udf in regression tests (as per prev commit) 2021-01-27 15:52:37 +03:00
Onur Tirtir 1a4482a37c Get rid of the sql dir for new udf 2021-01-27 15:52:37 +03:00
Onur Tirtir 2f30be823e Rename create_citus_local_table to citus_add_local_table_to_metadata
For simplicity in downgrade test in multi_extension, didn't
actually remove create_citus_local_table udf.
2021-01-27 15:52:36 +03:00
Onur Tirtir cd6f381d3c
Merge pull request #4567 from citusdata/hide-notice-undis
Hide notice messages when implicitly undistributing citus local tables
2021-01-27 13:54:40 +03:00
Onur Tirtir c06fcc26e5 Hide notice messages when implicitly undistributing citus local tables 2021-01-27 13:42:06 +03:00
Onur Tirtir 458a81f93d Add suppressNoticeMessages to TableConversionState 2021-01-27 12:53:58 +03:00
Onur Tirtir cacb76d2c6
Not mention citus local tables in error messages (#4579) 2021-01-27 12:36:53 +03:00
Naisila Puka 94bc2703bc
Make undistribute_table() and citus_create_local_table() work with columnar (#4563)
* Make undistribute_table() and citus_create_local_table() work with columnar

* Rename and use LocallyExecuteUtilityTask for UDF check

* Remove 'local' references in ExecuteUtilityCommand
2021-01-27 01:17:20 +03:00
Halil Ozan Akgül 9b6ccb313d
Merge pull request #4583 from citusdata/alter-am-to-columnar-notice-names-of-indexes
Adds error messages with names of indexes that will be dropped when converting to columnar
2021-01-26 18:46:01 +03:00
Halil Ozan Akgul bafa692fc1 Adds error messages with names of indexes that will be dropped 2021-01-26 18:18:26 +03:00
Ahmet Gedemenli 5659a3b830
Merge pull request #4574 from citusdata/fix-renaming-index-citus-local-tables
Fix index renaming when creating citus local tables
2021-01-26 17:32:45 +03:00
Ahmet Gedemenli e99f052904 Fix index renaming when creating citus local tables 2021-01-26 15:52:48 +03:00
Ahmet Gedemenli 7952100f49
Merge pull request #4561 from citusdata/fix-maintenance-daemon-crash
Remove failing assertions
2021-01-26 15:50:32 +03:00
Ahmet Gedemenli 6cba42a8bc
Merge branch 'master' into fix-maintenance-daemon-crash 2021-01-26 13:38:08 +03:00
SaitTalhaNisanci 499e7ed038
Update CHANGELOG for 9.5.2 (#4577) 2021-01-26 13:26:30 +03:00
Ahmet Gedemenli 14bf9d85d6
Merge branch 'master' into fix-maintenance-daemon-crash 2021-01-26 12:52:28 +03:00
Hadi Moshayedi 54f0e8619a
Merge pull request #4566 from citusdata/write-opt
Columnar: optimize write path.
2021-01-25 12:00:09 -08:00
Jeff Davis d62e54dc09 Columnar: optimize write path. 2021-01-25 11:47:21 -08:00
Hadi Moshayedi 350e0c1d61
Merge pull request #4565 from citusdata/fix_4555
Read chunk row count from catalog tables
2021-01-25 09:04:36 -08:00
Hadi Moshayedi 639952ffa8 Read chunk row count from catalog tables 2021-01-25 08:53:52 -08:00