Commit Graph

822 Commits (e3c763c3f75fb65366b8ca421e944611ee3a39b5)

Author SHA1 Message Date
Andres Freund 78b085106a Remove connection_cache.[ch]. 2017-01-21 09:01:15 -08:00
Andres Freund 6ec34bed84 Remove remnants of commit_protocol.[ch]. 2017-01-21 09:01:15 -08:00
Andres Freund fd717d6da9 Consistently libpq forward declaration in remote_commands.h. 2017-01-21 09:01:14 -08:00
Andres Freund 52c3369f79 Minimal citus tools conversion to new connection API. 2017-01-21 09:01:14 -08:00
Önder Kalacı 92254ac6b2 Merge pull request #1148 from citusdata/fix_command_counter_increment
Improve heap access methods for upgrading to reference tables
2017-01-21 09:33:13 +02:00
Önder Kalacı 594fa761e1 Merge branch 'master' into fix_command_counter_increment 2017-01-21 09:21:19 +02:00
Andres Freund 5b58338ace Merge pull request #1133 from citusdata/copy_with_new_connection_api
Convert multi_copy to new connection api
2017-01-20 22:22:50 -08:00
Murat Tuncer d76f781ae4 Convert multi copy to use new connection api
This enables proper transactional behaviour for copy and relaxes some
restrictions like combining COPY with single-row modifications. It
also provides the basis for relaxing restrictions further, and for
optionally allowing connection caching.
2017-01-20 19:15:19 -08:00
Jason Petersen cc594e00ca Merge pull request #1151 from citusdata/default_rep_factor_one
Change default replication factor to one

cr: @anarazel
2017-01-20 19:11:02 -07:00
Jason Petersen 4e7b23472c
Change default replication factor to one
Took the quick-and-dirty approach of changing it back to two during
test runs. Can update tests to expect one in due time.
2017-01-20 18:56:43 -07:00
Joe Nelson ff7ca32bae Merge pull request #1152 from citusdata/craig-readme-update
Suggest cloud in getting started section of README
2017-01-20 16:51:04 -08:00
Joe Nelson 8ccd5ca204
Suggest cloud in quickstart
Plus other updates
2017-01-20 16:39:04 -08:00
Andres Freund a296aca257 Merge pull request #1146 from citusdata/explain_duplication
Don't duplicate planner logic in multi_explain.c
2017-01-20 13:58:48 -08:00
Andres Freund 3a36d32c43 Mark some now unnecessarily exposed multi_planner.c functions static. 2017-01-20 12:31:56 -08:00
Andres Freund 608bed0387 Don't duplicate planning logic in citus' explain hook.
Instead use pg_plan_query() like the normal explain does, and use that
to explain the query.  That's important because it allows to remove
the duplicated planner logic from multi_explain - and that logic is
about to get more complicated.
2017-01-20 12:31:28 -08:00
Andres Freund 0f28a11970 Remove citus.explain_multi_logical/physical_plan.
They make fixing explain for prepared statement harder, and they don't
really fit into EXPLAIN in the first place.  Additionally they're
currently not exercised in any tests.
2017-01-20 12:31:19 -08:00
Onder Kalaci bd825be340 Improve heap access methods
This commit improves heap access methods for reference table
upgrade and colocation group modifications.
2017-01-20 14:53:29 +02:00
Metin Döşlü ac7235bfaa Merge pull request #1145 from citusdata/tenant_isolation_community
Tenant isolation
2017-01-20 13:49:04 +02:00
Metin Doslu 2bd8f8f12e Add a function to delete shard metadata from MX nodes 2017-01-20 14:38:01 +02:00
Metin Doslu 93e626c896 Refactor get_shard_id_for_distribution_column() and other minor changes 2017-01-20 14:38:01 +02:00
Metin Doslu ed77260aa1 Return a deep copy shard list from ColocatedShardIntervalList() 2017-01-20 14:38:01 +02:00
Metin Doslu 7cff8719c2 Add worker_hash() and a stub for isolate_tenant_to_new_shard() 2017-01-20 14:38:01 +02:00
Jason Petersen 46abe5b692 Merge pull request #1143 from citusdata/remove_hint_from_master_remove_node
Remove hint message from master_remove_node UDF

cr: @jasonmp85
2017-01-18 22:43:47 -07:00
Murat Tuncer c12bd7b75e
Remove hint message from master_remove_node UDF
Hint about master_disable_node  was giving wrong
impression to users. Removal is better than keeping it.
2017-01-18 22:33:00 -07:00
Eren Başak c0f1a7609f Merge pull request #1103 from citusdata/mx/reference_table_support
MX Support for Reference Tables
2017-01-18 17:15:12 +02:00
Eren Basak 4def1ca696 Prevent COPY to reference tables from worker nodes 2017-01-18 17:38:01 +03:00
Eren Basak e7c15ecc1f Make `upgrade_to_reference_table` function MX-compatible 2017-01-18 16:49:50 +03:00
Eren Basak 56ca590daa Propagate metadata changes for deleted reference table placements on master_remove_node call 2017-01-18 16:00:07 +03:00
Eren Basak be78769ae4 Propagate new reference table placement metadata on `master_add_node` 2017-01-18 15:59:06 +03:00
Eren Basak 23b2619412 Make reference table metadata synced to workers 2017-01-18 15:59:05 +03:00
Eren Basak e44d226221 Propagate Metadata to Workers on `create_reference_table` call. 2017-01-18 11:05:24 +03:00
Eren Başak 2668160fe8 Merge pull request #1090 from citusdata/mx_sequences
Add Sequence Support For MX Tables
2017-01-18 09:18:33 +02:00
Eren Basak b686d9a025 Add Sequence Support for MX Tables
This change adds support for serial columns to be used with MX tables.
Prior to this change, sequences of serial columns were created in all
workers (for being able to create shards) but never used. With MX, we
need to set the sequences so that sequences in each worker create
unique values. This is done by setting the MINVALUE, MAXVALUE and
START values of the sequence.
2017-01-18 09:43:38 +03:00
Eren Basak b1ce8d61c0 Create Invalidation Trigger for pg_dist_local_group Table Updates 2017-01-18 09:43:38 +03:00
Andres Freund b9c4a4b378 Merge pull request #1139 from citusdata/fix-1138
Query placementId in RemoteFinalizedShardPlacementList().
2017-01-17 13:49:53 -08:00
Andres Freund bdef35ac14 Query placementId in RemoteFinalizedShardPlacementList().
Not having the id in the ShardPlacement struct causes issues while
making copy use the placement aware connection management.
2017-01-17 13:27:26 -08:00
Brian Cloutier 67ee357d7f Port WorkerShardStats to new connection API
Part of the work in citusdata/citus#1101, this is a pretty direct port
over to the new functions and shouldn't result in any behavior changes.
2017-01-17 17:04:37 +02:00
Brian Cloutier b1b2b4fadf Create ExecuteOptionalRemoteCommand
A small refactor which pulls some code out of `RecoverWorkerTransactions`
and into `remote_commands.c`. This code block currently only occurs in
`RecoverWorkerTransactions` but will be useful to other functions
shortly.

Unfortunately we couldn't call it `ExecuteRemoteCommand`, that name was
already taken.
2017-01-17 17:04:37 +02:00
Brian Cloutier 539a205462 Pass entire ShardPlacement into WorkerShardStats
A small refactor so we'll be able to call the new connection API (which
requires having a ShardPlacement) from within WorkerShardStats.
2017-01-17 17:04:37 +02:00
Andres Freund 3ea73b7879 Merge pull request #1120 from citusdata/feature/colocation_mapping
Colocation aware placement connections
2017-01-16 13:54:59 -08:00
Andres Freund b9385700ee Make placement_connection.c colocation aware.
Because of foreign keys and similar concerns there should only be a
single modifying/DDL connection for a set of colocated placements to a
node.  To enforce placement_connection.c now has an additional
hash-table keeping track of the connections to a set of colocated
placements.  In addition to enforcing per placement restrictions on
connections, there's now very similar restrictions for sets of
colocated placements.
2017-01-16 13:47:01 -08:00
Andres Freund 6972186652 Add ShardPlacement fields required for colocated placement connection mapping. 2017-01-16 13:42:54 -08:00
Andres Freund 1d79820b74 Fix use of wrong constant.
This could potentially lead to spuriously shared connections if the
first 63 characters of a hostname are the same.
2017-01-16 13:42:53 -08:00
Andres Freund 4b1d37b7be Remove fields used in earlier revisions of placement_connection.c. 2017-01-16 13:42:53 -08:00
Jason Petersen d6ed47a7e6 Merge pull request #1085 from citusdata/improve_insert_select_error_messages
Improve error messages for INSERT INTO .. SELECT

cr: @jasonmp85
2017-01-16 12:26:49 -07:00
Onder Kalaci a7ed49c16e
Improve error messages for INSERT INTO .. SELECT
This commit is intended to improve the error messages while planning
INSERT INTO .. SELECT queries. The main motivation for this change is
that we used to map multiple cases into a single message. With this change,
we added explicit error messages for many cases.
2017-01-16 12:16:14 -07:00
Burak Yücesoy e334e6bc40 Merge pull request #1105 from citusdata/update_reference_table_metadata_on_remove_node
Remove placement metadata of reference tables after master_remove_node
2017-01-16 11:37:52 +03:00
Burak Yucesoy 3315ae6142 Remove placement metadata of reference tables after master_remove_node
With this change, we start to delete placement of reference tables at given worker node
after master_remove_node UDF call. We remove placement metadata at master node but we do
not drop actual shard from the worker node. There are two reasons for that decision,
first, it is not critical to DROP the shards in the workers because Citus will ignore them
as long as node is removed from cluster and if we add that node back to cluster we will
DROP and recreate all reference tables. Second, if node is unreachable, it becomes
complicated to cover failure cases and have a transaction support.
2017-01-16 11:24:56 +03:00
Murat Tuncer 0af5d553d1 Merge pull request #1024 from citusdata/feature/442_view_support
Add view support for select queries
2017-01-13 09:02:07 +02:00
Murat Tuncer e7935a3be4 Report error when original range table id is not found in NewTableId() 2017-01-13 09:39:43 +03:00