Commit Graph

1666 Commits (e8a8d300ec66605bab8e19b74dab56648d2bf072)

Author SHA1 Message Date
Marco Slot e8a8d300ec Throw an error if placements cannot be found in router executor 2018-05-17 13:51:24 +03:00
Marco Slot a5e9b29630 Bump version to 7.2.2 2018-05-04 12:57:00 +02:00
Marco Slot 9358eee28d Add changelog entry for 7.2.2 2018-05-04 12:21:35 +02:00
Hadi Moshayedi b9780956c3 Fail task in real-time executor if no placements found. (#2133) 2018-05-04 12:16:52 +02:00
Brian Cloutier 939385cf1e GetNextNodeId() incorrectly called PG_RETURN_DATUM
- Also stabilize the output of a multi_router_planner test
2018-04-26 09:35:02 -06:00
Metin Doslu d4147632c5 Fix regression for changes on REL_10_STABLE 2018-04-26 09:35:02 -06:00
Metin Doslu 18b0feb4f8 Fix failing regressions with order by 2018-02-06 16:00:46 +02:00
velioglu ade091d95c Bump version to 7.2.1 2018-02-06 16:15:48 +03:00
Metin Doslu 37e160cc45 Add changelog entry for 7.2.1 2018-02-06 16:15:48 +03:00
Murat Tuncer 9d076714b6 Update regression test output expectation based on recent PG10 change 2018-02-06 16:15:47 +03:00
Murat Tuncer 41f1466cf8 Fix count distinct using field select on top level query
We were allowing count distict queries even if they were
not directly on columns if the query is grouped on
distribution column.

When performing these checks we were skipping subqueries
because they also perform this check in a more concise manner.
We relied on oid SUBQUERY_RELATION_ID (10000) to decide if
a given RTE relation id denotes a subquery, however, we also
use SUBQUERY_PUSHDOWN_RELATION_ID (10001) for some subqueries.

We skip both type of subqueries with this change.
2018-02-06 16:15:47 +03:00
metdos 4e42600cb5 Respect enable_hashagg in the master planner 2018-02-06 16:15:46 +03:00
metdos 2a24e849fb Fix typo in grouping_is_sortable() 2018-02-06 16:15:46 +03:00
Onder Kalaci 0880a3e1b4 Allocate enough space for transaction nodes
This fix prevents any potential memory access that might occur
while forming the deadlock path.
2018-02-06 16:15:46 +03:00
Onder Kalaci b2fa25ddd5 Fix bug while traversing the distributed deadlock graph
With this fix, we traverse the graph with DFS which was originally
intended. Note that, before the fix, we traverse the graph with BFS
which might lead to killing some unrelated backend that is not
involved in the distributed deadlock.
2018-02-06 16:15:46 +03:00
velioglu 4b1a0c1a02 Adds missing item to 7.2 changelog 2018-02-06 14:55:34 +02:00
velioglu c774938711 Bump Citus version to 7.2.0 2018-01-16 11:46:29 +03:00
velioglu 73bb0ea7b8 Add changelog entry for 7.2.0 2018-01-16 11:46:28 +03:00
Burak Velioglu ef3517a5dc
Merge pull request #1943 from citusdata/release-6.2-changelog
Add changelog entry for 6.2.5
2018-01-11 12:31:53 +03:00
velioglu a7eccd5d9d Add changelog entry for 6.2.5 2018-01-11 11:28:02 +03:00
Burak Velioglu e328ff973f
Merge pull request #1929 from citusdata/citus-7.1.2-changelog
Bump citus to 7.1.2
2018-01-04 14:23:22 +03:00
velioglu 70fade547b Add changelog entry for 7.1.2 2018-01-04 13:39:27 +03:00
Hadi Moshayedi 5d7c52ffa6
Don't return in PG_TRY() block when cancellations happen in WaitForConnections(). (#1923)
We shouldn't return in middle of a PG_TRY() block because if we do, we won't reset PG_exception_stack, and later when a re-throw tries to jump to the jump-point which was active in this PG_TRY() block, it seg-faults.

We used to return in middle of PG_TRY() block in WaitForConnections() where we checked for cancellations. Whenever cancellations were caught here, Citus crashed. And example was reported by @onderkalaci at #1903.
2018-01-03 09:54:03 -05:00
Marco Slot 8f69973411 Fix cancellation issues in the real-time executor (#1905) 2018-01-01 23:10:29 -05:00
Marco Slot 3fd65cb91b Do not raise errors in the real-time executor (#1903) 2018-01-01 22:26:31 -05:00
Önder Kalacı 6e34a8fbf4
Merge pull request #1918 from citusdata/fix_outer_join_pushdown
Outer joins should also use/try subquery pushdown planner if join clause is not supported
2017-12-29 17:56:13 +03:00
Onder Kalaci a1bbdf2d44 Outer joins should also use subquery pushdown planner if join
clause is not supported

This change allows unsupported clauses to go through query pushdown
planner instead of erroring out as we already do for non-outer joins.
2017-12-29 16:40:47 +02:00
Önder Kalacı 4e9d4c1bd3
Merge pull request #1894 from citusdata/unions
Support set operations
2017-12-26 15:19:23 +03:00
Marco Slot 09c09f650f Recursively plan set operations when leaf nodes recur 2017-12-26 13:46:55 +02:00
Önder Kalacı 4650418f58
Merge pull request #1907 from citusdata/add_some_tests
Add some regression tests for recursively planned subqueries
2017-12-25 16:17:36 +03:00
Onder Kalaci eb929e9001 Add some more basic regression tests, mostly for documentation purposes 2017-12-25 15:03:45 +02:00
Mehmet Furkan ŞAHİN e92aca6fe7
Merge pull request #1901 from citusdata/errors_fix
Error messages are updated after recursive planner
2017-12-25 15:27:25 +03:00
mehmet furkan şahin 446893234a unsupported subquery error messages are fixed 2017-12-25 15:10:59 +03:00
Mehmet Furkan ŞAHİN dcafd1368b
Merge pull request #1897 from citusdata/subquery_debug_output
new debug output for subplans
2017-12-25 10:19:04 +03:00
mehmet furkan şahin 57bc86e23d new debug output for subplans 2017-12-25 09:50:51 +03:00
Marco Slot a2e2419ad1
Merge pull request #1878 from citusdata/log_remote_command
Log remote commands sent via MultiClientSendQuery
2017-12-22 17:30:18 +01:00
Marco Slot fa7fa2734b Log remote commands sent via MultiClientSendQuery 2017-12-22 16:18:40 +01:00
Murat Tuncer 87c6f306f1
Fix join clause eq restrictions (#1884)
We used to error out if the join clause includes filters like
t1.a < t2.a even if other filter like t1.key = t2.key exists.

Recently we lifted that restriction in subquery planning by
not lifting that restriction and focusing on equivalance classes
provided by postgres.

This checkin forwards previously erroring out real-time queries
due to join clauses to subquery planner and let it handle the
join even if the query does not have a subquery.

We are now pushing down queries that do not have any
subqueries in it. Error message looked misleading, changed to a more descriptive one.
2017-12-22 12:16:14 +03:00
Metin Döşlü 3aee73674b
Merge pull request #1895 from citusdata/no_shard_locks_for_ddls
Get shard resource locks for only DMLs
2017-12-22 10:57:20 +03:00
metdos 32b7e152a3 Get shard resource locks for only DMLs 2017-12-22 10:30:41 +02:00
Murat Tuncer a9cf0c3e66
Fix CTE column alias issue (#1893)
We were creating intermediate query result's target
names from subquery target list. Now we also check
if cte re-defines its column name aliases, and create
intermediate result query accordingly.
2017-12-22 09:39:40 +03:00
Marco Slot fa134984c2
Merge pull request #1806 from citusdata/deadlock-spam
Don't spam the log with deadlock messages
2017-12-21 17:10:32 +03:00
Brian Cloutier 377b31dcf7 Remove enable_deadlock_prevention prevention warning 2017-12-21 14:47:52 +01:00
Marco Slot 6862cd066e
Merge pull request #1818 from citusdata/remove-strtoull-ifdef
Remove an ifdef surrounding strtoull
2017-12-21 16:47:34 +03:00
Brian Cloutier fb7b86fa14 Replace strtoull with pg_strtouint64
The macro we were using to detect strtoull isn't set on Windows, and
just in case there are differences use a portable function from PG
instead of calling strtoull directly.
2017-12-21 14:28:51 +01:00
Mehmet Furkan ŞAHİN 3f7e0d780e
Merge pull request #1883 from citusdata/intermediate_result_size_limitation
Intermediate result size limitation
2017-12-21 14:42:54 +03:00
mehmet furkan şahin fd546cf322 Intermediate result size limitation
This commit introduces a new GUC to limit the intermediate
result size which we handle when we use read_intermediate_result
function for CTEs and complex subqueries.
2017-12-21 14:26:56 +03:00
Önder Kalacı 54ccfb24be
Merge pull request #1876 from citusdata/subqueries
Recursively plan subqueries that are not safe to pushdown (i.e., requires merge step)
2017-12-21 09:58:35 +03:00
Onder Kalaci e2a5124830 Add regression tests for recursive subquery planning 2017-12-21 08:37:40 +02:00
Onder Kalaci 0d5a4b9c72 Recursively plan subqueries that are not safe to pushdown
With this commit, Citus recursively plans subqueries that
are not safe to pushdown, in other words, requires a merge
step.

The algorithm is simple: Recursively traverse the query from bottom
up (i.e., bottom meaning the leaf queries). On each level, check
whether the query is safe to pushdown (or a single repartition
subquery). If the answer is yes, do not touch that subquery. If the
answer is no, plan the subquery seperately (i.e., create a subPlan
for it) and replace the subquery with a call to
`read_intermediate_results(planId, subPlanId)`. During the the
execution, run the subPlans first, and make them avaliable to the
next query executions.

Some of the queries hat this change allows us:

   * Subqueries with LIMIT
   * Subqueries with GROUP BY/DISTINCT on non-partition keys
   * Subqueries involving re-partition joins, router queries
   * Mixed usage of subqueries and CTEs (i.e., use CTEs in
     subqueries as well). Nested subqueries as long as we
     support the subquery inside the nested subquery.
   * Subqueries with local tables (i.e., those subqueries
     has the limitation that they have to be leaf subqueries)

   * VIEWs on the distributed tables just works (i.e., the
     limitations mentioned below still applies to views)

Some of the queries that is still NOT supported:

  * Corrolated subqueries that are not safe to pushdown
  * Window function on non-partition keys
  * Recursively planned subqueries or CTEs on the outer
    side of an outer join
  * Only recursively planned subqueries and CTEs in the FROM
    (i.e., not any distributed tables in the FROM) and subqueries
    in WHERE clause
  * Subquery joins that are not on the partition columns (i.e., each
    subquery is individually joined on partition keys but not the upper
    level subquery.)
  * Any limitation that logical planner applies such as aggregate
    distincts (except for count) when GROUP BY is on non-partition key,
    or array_agg with ORDER BY
2017-12-21 08:37:40 +02:00