Commit Graph

2372 Commits (4b9519e7d654a3d1149e2671fd95a39c0ba630fc)

Author SHA1 Message Date
Jason Petersen 4b9519e7d6 Check for non-extended constraint before extending
This will only apply to DROP and VALIDATE commands; see the lengthy
comment in multi_create_table_constraints.sql for more explanation.
2019-04-15 23:14:21 -06:00
Jason Petersen 5a017c684c Add repro case for #2484 2019-04-15 23:14:11 -06:00
Önder Kalacı 5e9dd629a2
Merge pull request #2661 from citusdata/add_orderby_subquery
Add order by subquery_complex_target_list
2019-04-11 13:08:04 +02:00
Onder Kalaci 6d81fc518c Add order by subquery_complex_target_list 2019-04-10 19:55:41 +03:00
Hadi Moshayedi 1706813dd7
Merge pull request #2659 from citusdata/fix_more_order_bys
Add missing ORDER BYs
2019-04-09 14:00:22 -07:00
Onder Kalaci 58e90ad60d Add order by multi_outer_join 2019-04-09 12:53:57 +03:00
Onder Kalaci 298e95c441 Add order by multi_shard_update_delete 2019-04-09 12:41:46 +03:00
Onder Kalaci 6a8e2c260a Add order by multi_insert_select 2019-04-09 12:28:57 +03:00
Onder Kalaci af096a898c Add order by subquery_and_cte 2019-04-09 12:19:10 +03:00
Onder Kalaci 56a1a39fd4 Add order by multi_subquery_complex_queries 2019-04-09 12:12:26 +03:00
Onder Kalaci 4effa8c1f8 Add order by multi_schema_support 2019-04-09 11:52:08 +03:00
Önder Kalacı 9c097c9f01
Merge pull request #2657 from citusdata/get_ready_for_unified_executor_order_bys
Make sure that the regression tests are resistant to execution order changes
2019-04-08 10:54:20 +02:00
Onder Kalaci 92e87738dd Make sure that the regression test output is durable to different execution orders
Mostly add order bys and suppress worker node ports in the test
outputs.
2019-04-08 11:48:08 +03:00
Jason Petersen 358ca53696 Separate follower tests and enable core dumps 2019-04-08 01:05:36 -06:00
Jason Petersen 25eece427f Remove Travis config, etc. 2019-04-07 22:44:08 -06:00
Önder Kalacı 085b3dd6cb
Merge pull request #2656 from citusdata/get_ready_for_unified_executor
Rename MultiConnectionState to MultiConnectionPollState
2019-04-05 15:38:23 +02:00
Onder Kalaci 7d872a343a Rename MultiConnectionState to MultiConnectionPollState 2019-04-05 11:50:11 +03:00
Önder Kalacı 87db7a7578
Merge pull request #2647 from citusdata/fix_alloca_bug
Ensure that stack resizing logic works expected
2019-04-03 12:24:14 +02:00
Onder Kalaci fb38dc3136 Ensure that stack resizing logic works expected
This commit has two goals:

(a) Ensure to access both edges of the allocated stack
(b) Ensure that any compiler optimizations to prevent the
    function optimized away.

Stack size after the patch:
 sudo grep -A 1 stack /proc/2119/smaps
7ffe305a6000-7ffe307a9000 rw-p 00000000 00:00 0                          [stack]
Size:               2060 kB

Stack size before the patch:
 sudo grep -A 1 stack /proc/3610/smaps
7fff09957000-7fff09978000 rw-p 00000000 00:00 0                          [stack]
Size:                132 kB
2019-04-03 10:58:19 +03:00
Burak Velioglu 4a982358a6
Merge pull request #2644 from citusdata/citus-8.2.0-changelog-1553759261
Bump citus to 8.2.0
2019-03-28 14:48:18 +03:00
Burak Velioglu c5a7827b48 Add changelog entry for 8.2.0 2019-03-28 13:45:17 +03:00
Murat Tuncer e803eb8a02
Merge pull request #2631 from citusdata/fix_column_alias
Fix column references to aliased joins
2019-03-26 13:17:56 +03:00
Murat Tuncer 1424f75ec9 Support columns referencing an aliased joins
We used to rely on PG function flatten_join_alias_vars
to resolve actual columns referenced in target entry list.

The function goes deep and finds the actual relation. This logic
usually works fine. However, when joins are given an alias, inner
relation names are not visible to target entry entry. Thus relation
resolving should stop when we the target entry column refers an
rte of an aliased join.

We stopped using PG function and provided our own flatten function.
2019-03-26 09:46:22 +03:00
Jason Petersen f218549572
Merge pull request #2640 from citusdata/fix_bad_pruning
Address unsafe coercion removal in pruning logic

cr: @onderkalaci
2019-03-25 23:05:41 -05:00
Jason Petersen 4c7f78bd7e Code review feedback 2019-03-25 22:07:27 -05:00
Jason Petersen 6a0dc7756e Formatting fixes
Noticed a lot of weird lines wrapped at 80; our standard is 90.
2019-03-22 20:32:19 -06:00
Jason Petersen 6acf52660c Always coerce RHS of pruning op to part. key type
Our assumption that strip_implicit_coercions would leave us with a bi-
nary-compatible type to that of the partition key was wrong. Instead,
we should ensure the RHS of the comparison we perform is proactively
coerced into a compatible type (at least binary compatible).
2019-03-22 20:32:19 -06:00
Jason Petersen 5baa257c91 Add second assert to guard against future changes
This isn't entirely necessary but I feel safer with it here.
2019-03-22 20:32:19 -06:00
Jason Petersen 69adb627c3 Add Assert that will crash before coercion fix is in 2019-03-22 20:32:19 -06:00
Hadi Moshayedi ff1d4f697a
Ignore test_times.log (#2638) 2019-03-22 10:29:01 -07:00
Nils Dijk feaac69769
Implementation for asycn FinishConnectionListEstablishment (#2584) 2019-03-22 17:30:42 +01:00
Marco Slot 7a094edc4c
Merge pull request #2635 from citusdata/rescan_withhold
Allow rescan in DECLARE .. WITH HOLD
2019-03-22 16:09:01 +01:00
Marco Slot e3b7e74f43 Allow rescan in DECLARE .. WITH HOLD 2019-03-22 11:25:55 +01:00
Jason Petersen 1a7c73c37b
Merge pull request #2632 from citusdata/fix_conninfo_memory_bugs
Fix conninfo memory bugs

cr: @onderkalaci, @marcocitus
2019-03-21 12:47:12 -06:00
Jason Petersen a2c6f596f9 Address code review comments 2019-03-21 11:59:52 -06:00
Jason Petersen 04aa34da68 Invalidate ConnParamsHash at config reload
At configuration reload, we free all "global" (i.e. GUC-set) connection
parameters, but these may still have live references in the connection
parameters hash. By marking the entries as invalid, we can ensure they
will not be used after free.
2019-03-21 00:03:35 -06:00
Jason Petersen 00d836e5a3 alloc non-global conn. params in provided context
Having DATA-segment string literals made blindly freeing the keywords/
values difficult, so I've switched to allocating all in the provided
context; because of this (and with the knowledge of the end point of
the global parameters), we can safely pfree non-global parameters when
we come across an invalid connection parameter entry.
2019-03-21 00:03:35 -06:00
Önder Kalacı 67ecbe821a
Merge pull request #2633 from citusdata/trivial_parts_of_faster_all_things
Decrease CPU overhead of some of the planner functions
2019-03-20 11:27:43 +01:00
Marco Slot e8152d9b6d Only look in top-level rtable in ExtractFirstDistributedTableId 2019-03-20 12:14:46 +03:00
Marco Slot ee6a0b6943 Speed up RTE walkers
Do it in two ways (a) re-use the rte list as much as possible instead of
re-calculating over and over again (b) Limit the recursion to the relevant
parts of the query tree
2019-03-20 12:14:46 +03:00
Marco Slot 5ff1821411 Cache the current database name
Purely for performance reasons.
2019-03-20 12:14:46 +03:00
Marco Slot 0ea4e52df5 Add nodeId to shardPlacements and use it for shard placement comparisons
Before this commit, shardPlacements were identified with shardId, nodeName
and nodeport. Instead of using nodeName and nodePort, we now use nodeId
since it apparently has performance benefits in several places in the
code.
2019-03-20 12:14:46 +03:00
Önder Kalacı 32ee0217d5
Merge pull request #2617 from citusdata/add_more_tests
Add some more regression tests for outer join pushdown
2019-03-19 11:01:20 +01:00
Onder Kalaci 41d8c4030a Add some more regression tests for outer join pushdown 2019-03-19 11:49:38 +03:00
Önder Kalacı 7914a039a7
Merge pull request #2628 from citusdata/fix_infinite_recursion
Some queries lead to infinite recursion during recursive planning
2019-03-18 15:15:25 +01:00
Onder Kalaci ad5ff1d01a Some queries lead to infinite recursion with recurisve planning
The rule for infinite recursion is the following:

    - If the query contains a subquery which is recursively planned, and
      no other subqueries can be recursively planned due to correlation
      (e.g., LATERAL joins), the planner keeps recursing again and again.

One interesting thing here is that even if a subquery contains only intermediate
result(s), we re-recursively plan that. In the end, the logic in the code does the following:

  - Try recursive planning any of the subqueries in the query tree
     - If any subquery is recursively planned, call the planner again
        where the subquery is replaced with the intermediate result.
        - Try recursively planning any of the queries
          - If any subquery is recursively planned, call the planner again
            where the subquery (in this case it is already intermediate result)
            is replaced with the intermediate result.
              - Try recursively planning any of the queries
                - If any subquery is recursively planned, call the planner again
                  where the subquery (in this case it is already intermediate result)
                  is replaced with the intermediate result.
                  - Try recursively planning any of the queries
                    - If any subquery is recursively planned, call the planner again
                      where the subquery (in this case it is already intermediate result)
                      is replaced with the intermediate result.
                      ......
2019-03-18 10:35:00 +03:00
Jason Petersen 8787cb3199
Merge pull request #2587 from citusdata/xact_functions
Treat functions as transaction blocks

cr: @jasonmp85
2019-03-15 16:54:20 -06:00
Marco Slot f2abf2b8e5 Functions are treated as transaction blocks 2019-03-15 16:34:08 -06:00
Marco Slot 4b9bd54ae0 Remove create_insert_proxy_for_table 2019-03-15 14:13:03 -06:00
exialin 84b853e1b5 Fix some typos (#2620) 2019-03-14 16:48:31 -07:00