Commit Graph

2945 Commits (f9b091d37e93f9b31b8499f14a72c3e611fa315e)

Author SHA1 Message Date
Hanefi Onaldi f9b091d37e
Add changelog entry for 9.1.2
(cherry picked from commit 7a909fc807)
2019-12-30 11:35:47 +03:00
Jelte Fennema 74b4c48dcd Makefile fix DESTDIR together with cleanup (#3342)
This should fix this build issue: redmine.postgresql.org/issues/5032
2019-12-27 14:15:10 +01:00
Onur TIRTIR 9a68f4ace1 Add changelog entry for 9.1.1 (#3321)
(cherry picked from commit eb3c1b4eb4)
2019-12-18 16:23:38 +03:00
Onur Tirtir 36efc1d91f Bump version to 9.1.1 2019-12-18 16:21:54 +03:00
Nils Dijk b4facca9c3 make sure to correctly decrement ExecutorLevel (#3311)
DESCRIPTION: Fix counter that keeps track of internal depth in executor

While reviewing #3302 I ran into the `ExecutorLevel` variable which used a variable to keep the original value to restore on successful exit. I haven't explored the full space and if it is possible to get into an inconsistent state. However using `PG_TRY`/`PG_CATCH` seems generally more correct.

Given very bad things will happen if this level is not reset, I kept the failsafe of setting the variiable back to 0 on the `XactCallback` but I did add an assert to treat it as a developer bug.
2019-12-18 08:57:20 +01:00
Marco Slot 9f8e34f874 Fix issue in IsMultiStatementTransaction detection 2019-12-18 08:56:46 +01:00
Hadi Moshayedi 37b3ac3773 Detect SQL UDF Calls. 2019-12-18 08:56:39 +01:00
Marco Slot 671e06feb0 Forbid using connections that sent intermediate results for data access and vice versa 2019-12-18 08:44:53 +01:00
Marco Slot 7694d896e3 Fix crash in IN (NULL) queries 2019-12-18 08:44:41 +01:00
Hadi Moshayedi c88648cbe0
Merge pull request #3317 from citusdata/cherrypick-3280
Cherrypick 3280
2019-12-17 15:30:05 -08:00
Hadi Moshayedi 03d45f376c Update test output 2019-12-17 15:22:11 -08:00
Hadi Moshayedi aa1ff2f3d3 Tests for multi-statement transactions with subqueries or ctes 2019-12-17 15:02:00 -08:00
Hadi Moshayedi 641e78d407 Don't plan function joins locally 2019-12-17 15:01:50 -08:00
Hadi Moshayedi 847f02d41f Don't plan joins between ref tables and views locally 2019-12-17 15:01:25 -08:00
Hadi Moshayedi c2a15da44e Fix the way we check for local/reference table joins in the executor 2019-12-17 14:59:24 -08:00
Marco Slot 625922e200 Fix inserts into local tables with distributed subqueries 2019-12-17 20:02:37 +01:00
Marco Slot c0665adcce Fix errors in DML with sublinks hidden by null expressions 2019-12-17 20:02:20 +01:00
Marco Slot 42f2ad6133 Fix issue with some zero-shard modifications 2019-12-17 20:01:59 +01:00
Marco Slot 25fab29e00 Fix segfault in column_to_column_name 2019-12-17 20:01:48 +01:00
Marco Slot b8b6d2860a Fix segfault when executing DDL via UDF 2019-12-17 20:01:36 +01:00
Philip Dubé 4a35926f60 aggregate_support test: test DISTINCT, ORDER BY, FILTER, & no intermediate results
Previously,
- we'd push down ORDER BY, but this doesn't order intermediate results between workers
- we'd keep FILTER on master aggregate, which would raise an error about unexpected cstrings
2019-12-17 20:01:25 +01:00
Onur TIRTIR 19f427f34f Update CHANGELOG.md (#3241)
(cherry picked from commit ec9392e729)
2019-11-28 16:28:39 +03:00
Hadi Moshayedi 602c6300b1 Error for metadata commands if any metadata node is out-of-sync (#3226)
* Error for metadata commands if any metadata node is out-of-sync

* Make the functions have separate APIs for all workers/metadata workers
2019-11-27 09:54:10 +01:00
Marco Slot 287112b6a0 Swap aggregate_support tests to simplify enterprise merge 2019-11-26 13:41:22 +01:00
Önder Kalacı 66ee548c20 Make NodeCanHaveDistTablePlacements() public (#3229)
Since it is required in rebalancer.
2019-11-26 13:41:10 +01:00
Marco Slot cd64bd5c80 Add missing include to deparse_function_stmts.c 2019-11-24 06:17:11 +01:00
Marco Slot 25576189a0 Properly escape ALTER FUNCTION .. SET deparsing. Also test 2019-11-24 06:16:13 +01:00
Philip Dubé de897991d9 GetFunctionAlterOwnerCommand: use format_procedure_qualified
distributed_functions: test a function with a quote in name
AppendDefElemSet: quote variable names
2019-11-24 06:15:48 +01:00
Philip Dubé 038394a754 Fix distributed aggregation for non superuser roles
Moves support functions to pg_catalog for now. We'd prefer a different solution
for when we're creating these support functions dynamically
2019-11-24 06:15:05 +01:00
Khashayar Fereidani 86ef68a657 Fix underflow initialization of default values
Initialization of queryWindowClause and queryOrderByLimit "memset" underflow these variables.
It's possible due to the invalid usage sizeof this part of the program cause buffer overflow and function return data corruption in future changes.
2019-11-24 06:14:53 +01:00
Onur TIRTIR 7f4d13b470 Escape extension name in extension command propagation (#3218) 2019-11-24 15:09:25 +03:00
Hanefi Onaldi 00e8b6240c
Create relase-9.1 branch 2019-11-22 11:30:40 +03:00
Philip Dubé 99164398bf Fix potential segfault from standard_planner inlining functions 2019-11-21 18:47:36 +00:00
Philip Dubé c563e0825c Strip trailing whitespace and add final newline (#3186)
This brings files in line with our editorconfig file
2019-11-21 14:25:37 +01:00
Jelte Fennema 1d8dde232f
Automatically convert useless declarations using regex replace (#3181)
* Add declaration removal to CI

* Convert declarations
2019-11-21 13:47:29 +01:00
Onur TIRTIR 9961297d7b Improve extension command propagation logic and tests
* Improve extension command propagation tests

* patch for hardcoded citus extension name

(cherry picked from commit 0bb3dbac0afabda10e8928f9c17eda048dc4361a)
2019-11-21 11:24:39 +03:00
Marco Slot 7d2813f799 Update .codecov.yml after moving ruleutils files 2019-11-16 14:25:35 +01:00
Marco Slot 38748159ec
Merge pull request #3089 from citusdata/move_files
Move C files into the appropriate directories
2019-11-20 19:38:44 +01:00
Hanefi Onaldi d82f3e9406
Introduce intermediate result broadcasting
In plain words, each distributed plan pulls the necessary intermediate
results to the worker nodes that the plan hits. This is primarily useful
in three ways. 

(i) If the distributed plan that uses intermediate
result(s) is a router query, then the intermediate results are only
broadcasted to a single node.

(ii) If a distributed plan consists of only intermediate results, which
is not uncommon, the intermediate results are broadcasted to a single
node only.

(iii) If a distributed query hits a sub-set of the shards in multiple
workers, the intermediate results will be broadcasted to the relevant
node(s).

The final item (iii) becomes crucial for append/range distributed
tables where typically the distributed queries hit a small subset of
shards/workers.

To do this, for each query that Citus creates a distributed plan, we keep
track of the subPlans used in the queryTree, and save it in the distributed
plan. Just before Citus executes each subPlan, Citus first keeps track of
every worker node that the distributed plan hits, and marks every subPlan
should be broadcasted to these nodes. Later, for each subPlan which is a
distributed plan, Citus does this operation recursively since these
distributed plans may access to different subPlans, and those have to be
recorded as well.
2019-11-20 15:26:36 +03:00
Philip Dubé b7fef5c31a Miscellaneous cleanup in prep for collation propagation 2019-11-19 17:28:59 +00:00
Jelte Fennema 1ed05be82c
Flaky test: Fix recover_prepared_transactions (#3205)
Failed test: https://app.circleci.com/jobs/github/citusdata/citus/35994

We now always take a new connection
2019-11-19 17:49:13 +01:00
Jelte Fennema 1ac96f228b
Flaky test: Force correct plan (#3203)
Failing test: https://app.circleci.com/jobs/github/citusdata/citus/23148
2019-11-19 17:11:05 +01:00
Onur TIRTIR 26c306d188
Add extensions to distributed object propagation infrastructure (#3185) 2019-11-19 17:56:28 +03:00
SaitTalhaNisanci 2cb82ae9bd
create a utility method to mark tasks as failed (#3150) 2019-11-19 16:35:56 +03:00
SaitTalhaNisanci 306d159072
refactor AfterXacthodtConnectionHandling (#3202) 2019-11-19 14:50:23 +03:00
Jelte Fennema 87f57eb92b
Fix verify_metadata not returning consistent results (#3199)
Failing test: https://app.circleci.com/jobs/github/citusdata/citus/58827
2019-11-19 11:02:35 +01:00
Hanefi Onaldi e3ad4aba94
Bump 9.1devel
* Add Changelog entry for 9.0.1
* Bump citus version to 9.1devel
2019-11-19 10:35:57 +03:00
Marco Slot 18843af688
Return early in CitusHasBeenLoaded when creating a different ex… (#3178)
Return early in CitusHasBeenLoaded when creating a different extension
2019-11-18 22:10:43 +01:00
Önder Kalacı 40fa3862ce
Prevent Citus extension becoming distributed object (#3197)
Prevent Citus extension being distributed

Because that could prevent doing rolling upgrades, where users may
prefer to upgrade the version on the coordinator but not the workers.

There could be some other edge cases, so I'd prefer to keep Citus
extension outside the picture for now.
2019-11-18 16:57:10 +01:00
Halil Ozan Akgül c5c31e6093
Merge pull request #3184 from citusdata/alter_role_propagation
Alter Role Propagation
2019-11-18 18:43:15 +03:00