Commit Graph

763 Commits (d283c05290b1471f2a771a406958dd72ef97128d)

Author SHA1 Message Date
Jason Petersen d283c05290 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 5a66dc8278 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 a8fc8358e2 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 422a00794c Suggest cloud in quickstart
Plus other updates
2017-01-20 16:39:04 -08:00
Andres Freund df11634bba 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 2b58ac24dc Mark some now unnecessarily exposed multi_planner.c functions static. 2017-01-20 12:31:56 -08:00
Andres Freund 14ecb58159 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 2ec404a122 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
Metin Döşlü 578ee0077e Merge pull request #1145 from citusdata/tenant_isolation_community
Tenant isolation
2017-01-20 13:49:04 +02:00
Metin Doslu 099ef88238 Add a function to delete shard metadata from MX nodes 2017-01-20 14:38:01 +02:00
Metin Doslu 09ca6a464f Refactor get_shard_id_for_distribution_column() and other minor changes 2017-01-20 14:38:01 +02:00
Metin Doslu 08e285dd67 Return a deep copy shard list from ColocatedShardIntervalList() 2017-01-20 14:38:01 +02:00
Metin Doslu dd7c0bcb0c Add worker_hash() and a stub for isolate_tenant_to_new_shard() 2017-01-20 14:38:01 +02:00
Jason Petersen afdab4ddf0 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 d9dd275700 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 bc2cfa7323 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 0fa203b150 Prevent COPY to reference tables from worker nodes 2017-01-18 17:38:01 +03:00
Eren Basak ce8f9d0819 Make `upgrade_to_reference_table` function MX-compatible 2017-01-18 16:49:50 +03:00
Eren Basak 4c8c5da7f1 Propagate metadata changes for deleted reference table placements on master_remove_node call 2017-01-18 16:00:07 +03:00
Eren Basak fa0b36b28c Propagate new reference table placement metadata on `master_add_node` 2017-01-18 15:59:06 +03:00
Eren Basak c8fafa1ffb Make reference table metadata synced to workers 2017-01-18 15:59:05 +03:00
Eren Basak 86e772e4ae Propagate Metadata to Workers on `create_reference_table` call. 2017-01-18 11:05:24 +03:00
Eren Başak a7f8d4bc88 Merge pull request #1090 from citusdata/mx_sequences
Add Sequence Support For MX Tables
2017-01-18 09:18:33 +02:00
Eren Basak 096be1dde5 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 139e87a0ad Create Invalidation Trigger for pg_dist_local_group Table Updates 2017-01-18 09:43:38 +03:00
Andres Freund f0f54a4366 Merge pull request #1139 from citusdata/fix-1138
Query placementId in RemoteFinalizedShardPlacementList().
2017-01-17 13:49:53 -08:00
Andres Freund 5f4c85f1c4 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 b74fe324bc 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 213c24524d 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 da976e42ba 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 508619cedc Merge pull request #1120 from citusdata/feature/colocation_mapping
Colocation aware placement connections
2017-01-16 13:54:59 -08:00
Andres Freund 650f25d01a 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 9d43ad7b07 Add ShardPlacement fields required for colocated placement connection mapping. 2017-01-16 13:42:54 -08:00
Andres Freund cdc4e22be7 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 a9acf8c790 Remove fields used in earlier revisions of placement_connection.c. 2017-01-16 13:42:53 -08:00
Jason Petersen 900d71525d 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 169fb5943e 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 4d581124bb 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 96b55249a4 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 c4f7b9747d 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 3339240aa7 Report error when original range table id is not found in NewTableId() 2017-01-13 09:39:43 +03:00
Murat Tuncer 3b9a579a63 Add view support
Enables use views within distributed queries.
User can create and use a view on distributed tables/queries
as he/she would use with regular queries.

After this change router queries will have full support for views,
insert into select queries will support reading from views, not
writing into. Outer joins would have a limited support, and would
error out at certain cases such as when a view is in the inner side
of the outer join.

Although PostgreSQL supports writing into views under certain circumstances.
We disallowed that for distributed views.
2017-01-13 09:39:42 +03:00
Önder Kalacı 17f1740974 Merge pull request #1128 from citusdata/add_order_by_to_shardstate_tests
Add ORDER BY clause to shard state tests to have consistent output
2017-01-13 03:18:47 +02:00
Burak Yucesoy 324d2262a0 Add ORDER BY clause to shard state tests to have consistent output
In tests related to automatic reference table creation and deletion, there were some
tests whose output may change order thus creating inconsistent test results. With this
change we add ORDER BY clause to related tests to have consistent output.
2017-01-13 02:42:28 +03:00
Önder Kalacı 5ad49daa3a Merge pull request #1122 from citusdata/onder_update_ref
Refactor CheckShardPlacements() and improve support for node removal
2017-01-12 20:22:00 +02:00
Onder Kalaci 119b691eb4 Refactor CheckShardPlacements() and improve support for node removal
This commit refactors CheckShardPlacements() so that it only considers
modifyingConnection. Also, it skips nodes which are removed from the
cluster.
2017-01-12 20:10:10 +02:00
Murat Tuncer 26421f8e44 Merge pull request #1074 from citusdata/router_query_hint
Add hint to errored real time queries
2017-01-12 10:56:28 +02:00
Murat Tuncer 32b64efdc0 Add hint to errored real time queries 2017-01-12 11:33:35 +03:00
Önder Kalacı e31ebe7c54 Merge pull request #1116 from citusdata/fix_reference_copy
Copy on reference tables should never mark placements invalid
2017-01-12 02:55:16 +02:00
Onder Kalaci 08abe1b213 Copy on reference tables should never mark placements invalid
This commit ensures that COPY does not mark any placement
of reference's state as INVALID in case of an error.
2017-01-12 02:43:41 +02:00