Commit Graph

2835 Commits (5d6ee5104b98ee147eb6ffd6dd4e64f044927afc)

Author SHA1 Message Date
Jason Petersen d4e1172247 Implement propagation of SET LOCAL commands
Adds support for propagation of SET LOCAL commands to all workers
involved in a query. For now, SET SESSION (i.e. plain SET) is not
supported whatsoever, though this code is intended as somewhat of a
base for implementing such support in the future.

As SET LOCAL modifications are scoped to the body of a BEGIN/END xact
block, queries wishing to use SET LOCAL propagation must be within such
a block. In addition, subsequent modifications after e.g. any SAVEPOINT
or ROLLBACK statements will correspondingly push or pop variable mod-
ifications onto an internal stack such that the behavior of changed
values across the cluster will be identical to such behavior on e.g.
single-node PostgreSQL (or equivalently, what values are visible to
the end user by running SHOW on such variables on the coordinator).

If nodes enter the set of participants at some point after SET LOCAL
modifications (or SAVEPOINT, ROLLBACK, etc.) have occurred, the SET
variable state is eagerly propagated to them upon their entrance (this
is identical to, and indeed just augments, the existing logic for the
propagation of the SAVEPOINT "stack").

A new GUC (citus.propagate_set_commands) has been added to control this
behavior. Though the code suggests the valid settings are 'none', 'local',
'session', and 'all', only 'none' (the default) and 'local' are presently
implemented: attempting to use other values will result in an error.
2019-06-20 16:15:43 -07:00
Jason Petersen 1dec6c5163 Change BeginCoordinatedTransaction to internal linkage
It's only ever called from a single file, so having it be extern didn't
make a whole lot of sense.
2019-06-20 13:44:06 -07:00
Jason Petersen 2349e8e75c Remove extraneous comments around PG header change 2019-06-20 13:37:53 -07:00
Hadi Moshayedi 602f3cd551
Merge pull request #2780 from citusdata/master_super_copy
Make COPY adapt to connection use behaviour of previous commands in transaction
2019-06-20 20:00:30 +02:00
Hadi Moshayedi 4bbae02778 Make COPY compatible with unified executor. 2019-06-20 19:53:40 +02:00
Hadi Moshayedi 17d4d3e5ea
Merge pull request #2781 from citusdata/refactor_ExecuteModifyTasksSequentially
Refactor ExecuteModifyTasksSequentially.
2019-06-20 18:45:33 +02:00
Hadi Moshayedi 2e6d04df7b Refactor ExecuteModifyTasksSequentially. 2019-06-20 18:38:57 +02:00
Hadi Moshayedi 6741ffd716 Merge pull request #2775 from citusdata/remove_unneeded_expected_file
Use normalization for multi_subtransaction output
2019-06-19 18:00:24 +02:00
Hadi Moshayedi d4f3e2809d Use normalization for multi_subtransaction output 2019-06-19 17:54:33 +02:00
Hadi Moshayedi adb6afe8b9
Merge pull request #2774 from citusdata/fix_subxact_release
Fix subxact release crash.
2019-06-19 17:51:21 +02:00
Hadi Moshayedi 83f6c7dab4 Fix subxact release crash 2019-06-19 17:43:10 +02:00
Önder Kalacı dabe1e0add
Merge pull request #2769 from citusdata/refactor_create_dist_table
Refactor shard creation logic
2019-06-19 16:07:38 +02:00
Onder Kalaci 2b0c4accda Apply feedback 2019-06-19 10:03:58 +02:00
Onder Kalaci 3a04374a9e Refactor relation shard list creation during placement creation
This change is to make further refactoring even simpler such as
using the executor for shard creation.
2019-06-19 10:03:58 +02:00
Onder Kalaci 4fd1fcbbef Refactor shard creation logic
This is a preperation for the new executor, where creating shards
would go through the executor. So, explicitly generate the commands
for further processing.
2019-06-19 10:03:58 +02:00
Jason Petersen 96d9847aa4
Merge pull request #2757 from citusdata/werror
Enable Werror for all warnings

cr: @jasonmp85
2019-06-18 14:51:56 -07:00
Jason Petersen cdaca7297c Switch to werror-enabled CircleCI image 2019-06-18 14:43:54 -07:00
Philip Dubé 4bfcf5b665 Enable Werror for all warnings
Changes to ruleutils match changes made upstream to silence gcc fallthrough warnings
2019-06-18 14:43:54 -07:00
Hadi Moshayedi 04abc1137f
Merge pull request #2772 from citusdata/cancel
Use SendCancelationRequest() in ShutdownConnection()
2019-06-18 12:16:40 +02:00
Hadi Moshayedi b240854b8c Use SendCancelationRequest() in ShutdownConnection() 2019-06-18 12:10:05 +02:00
Hadi Moshayedi ee37e3da89
Merge pull request #2765 from citusdata/fix_diff
Fix test name detection in bin/diff
2019-06-17 12:39:34 +02:00
Hadi Moshayedi c42b22f8fd Fix test name detection in bin/diff 2019-06-17 11:31:42 +02:00
Philip Dubé ab15a214e0
Merge pull request #2733 from citusdata/fix_2642_joinalias
Fix join alias resolution
2019-06-12 17:34:39 -07:00
Philip Dubé 342d423725 Fix join alias resolution
FROM (query) alias ignored renaming
In nested subqueries the select list would rename, while the join alias would not respect that
2019-06-12 17:25:07 -07:00
Hanefi Onaldi b613403d87
update changelog for v8.2.2 2019-06-11 15:27:14 +03:00
Marco Slot c045c9c8eb
Merge pull request #2750 from citusdata/stats_collection_off
enable_statistics_collection defaults to off (opt-in)
2019-06-06 12:12:52 +02:00
Marco Slot c1ac794b77 enable_statistics_collection defaults to off 2019-06-05 18:43:26 +02:00
Hadi Moshayedi 674b7ce29a
Merge pull request #2748 from citusdata/ScanStateGetTupleDescriptor
Refactor some scan state info into their own functions.
2019-06-05 09:22:00 -07:00
Hadi Moshayedi 85325e0098 Refactor ScanStateGetExecutorState into its own function. 2019-06-05 09:16:43 -07:00
Hadi Moshayedi 0b01c59fa6 Refactor ScanStateGetTupleDescriptor() into a function. 2019-06-04 15:19:49 -07:00
Hadi Moshayedi 7abd28d3e8
Merge pull request #2654 from citusdata/fix_lateral_joins
Search all outer node levels for lateral join params.
2019-06-04 10:18:18 -07:00
Hadi Moshayedi 8e2d328530 Search all outer node levels for lateral join params. 2019-06-04 10:14:05 -07:00
Demur Rumed 5cc8049caa
Merge pull request #2742 from citusdata/fix_2739_outer_join_subquery_error
Also check rewrittenQuery jointree for outer join
2019-06-04 07:52:59 -07:00
Philip Dubé b5ced403d8 Also check rewrittenQuery jointree for outer join 2019-06-04 07:47:35 -07:00
Önder Kalacı b7f5819281
Merge pull request #2745 from citusdata/refactor_copy
Refactor ShardIdForTuple() to a separate function.
2019-06-03 10:24:17 +02:00
Hadi Moshayedi dee5bc31b4 Refactor ShardIdForTuple() to a separate function. 2019-06-02 09:48:15 -07:00
Önder Kalacı 27b0f0023c
Merge pull request #2716 from citusdata/max_cached_connections
Replace session lifespan flag with a configurable number of connections
2019-05-29 15:05:09 +02:00
Marco Slot c1566d464b Fix failure and isolation tests
On top of citus.max_cached_conns_per_worker GUC, with this commit
we're updating the regression tests to comply with the new behaviour.
2019-05-29 14:42:31 +02:00
Marco Slot bb3a96eacb Cache a configurable number of connections at xact end 2019-05-29 13:24:31 +02:00
Önder Kalacı caa8fffbd0
Merge pull request #2736 from citusdata/order_by_fix_9
Make sure that the regression tests are resistant to execution order changes
2019-05-28 12:27:45 +02:00
Onder Kalaci d46b92d79a Add order by to multi_mx_schema_support 2019-05-28 12:23:28 +02:00
Onder Kalaci fa2a6e4d8f Add order by to multi_mx_router_planner 2019-05-28 12:23:28 +02:00
Onder Kalaci 0a7a173eee Add order by to multi_mx_reference_table 2019-05-28 12:23:28 +02:00
Onder Kalaci 1553e12ee4 Add order by to multi_subquery_complex_reference_clause 2019-05-28 12:06:57 +02:00
Hadi Moshayedi d4dbe8f008
Merge pull request #2732 from citusdata/fix_a_typo
Fix a typo: WITH CARDINALITY -> WITH ORDINALITY
2019-05-24 15:58:31 -07:00
Hadi Moshayedi 23207a43e0 Fix a typo: WITH CARDINALITY -> WITH ORDINALITY 2019-05-24 15:49:17 -07:00
Demur Rumed aa74eea955
Merge pull request #2726 from citusdata/fix_2548_alterforeign
Propagate more ALTER FOREIGN TABLE commands to workers
2019-05-24 19:59:09 +00:00
Philip Dubé b8871d9ff4 Propagate more ALTER FOREIGN TABLE to workers 2019-05-24 12:54:05 -07:00
Marco Slot dff1a8db08
Merge pull request #2725 from citusdata/deprecate_mmms
Deprecate master_modify_multiple_shards
2019-05-24 14:33:49 +02:00
Marco Slot b3fcf2a48f Deprecate master_modify_multiple_shards 2019-05-24 15:22:06 +02:00