Commit Graph

908 Commits (087d8427e3791fda02a7b46e8603c09c6a5b171e)

Author SHA1 Message Date
Burak Yucesoy 087d8427e3
Error out if binary citus version does not match installed extension
With this change, we start to error out if loaded citus binaries does not match
the available major version or installed citus extension version. In this case
we force user to restart the server or run ALTER EXTENSION depending on the
situation
2017-04-03 17:36:13 -06:00
Jason Petersen bb5ae5eca4 Merge pull request #1287 from citusdata/support_concurrently
Support (CREATE|DROP) INDEX CONCURRENTLY

cr: @metdos
2017-04-03 12:06:11 -06:00
Jason Petersen 4cdfc3a10f
Address review feedback
Should just about do it.
2017-04-03 11:44:57 -06:00
Jason Petersen cf775c4773
Improve CONCURRENTLY-related error messages
Thought this looked slightly nicer than the default behavior.

Changed preventTransaction to concurrent to be clearer that this code
path presently affects CONCURRENTLY code only.
2017-04-03 11:19:15 -06:00
Jason Petersen dd9365433e
Update documentation
Ensure all functions have comments, etc.
2017-04-03 11:19:15 -06:00
Jason Petersen d904e96c59
Address MX CONCURRENTLY problems
Adds a non-transactional multi-command method to propagate DDLs to all
MX/metadata-synced nodes.
2017-04-03 11:19:15 -06:00
Jason Petersen 32886e97a3
Add code to set index validity on failure
Coordinator code marks index as invalid as a base, set it as valid in a
transactional layer atop that base, then proceeds with worker commands.
If a worker command has problems, the rollback results in an index with
isvalid = false. If everything succeeds, the user sees a valid index.
2017-04-03 11:19:15 -06:00
Jason Petersen dea6c44f75
Remove CONCURRENTLY checks, fix tests
Still pending failure testing, which broke with my recent changes.
2017-04-03 11:19:15 -06:00
Jason Petersen 0b6c4e756e
Change DropStmt to generate worker DDL on master
Because we can't execute DROP INDEX CONCURRENTLY during transactions,
worker_apply_shard_ddl_command is insufficient.
2017-04-03 11:19:15 -06:00
Jason Petersen 95d8d27c4f
Change IndexStmt to generate worker DDL on master
Because we can't execute CREATE INDEX CONCURRENTLY during transactions,
worker_apply_shard_ddl_command is insufficient.
2017-04-03 11:19:14 -06:00
Marco Slot de034d2cab Merge pull request #851 from citusdata/task_tracker_batching
Batch task_tracker_status calls to reduce task-tracker query times
2017-04-03 12:17:13 +02:00
Marco Slot 0f355a4a48 Batch task_tracker_status calls to reduce task-tracker query times 2017-03-31 11:54:11 +02:00
Metin Döşlü e25df3509c Merge pull request #1299 from citusdata/support_trigger_all
Add disable/enable trigger all support
2017-03-30 18:36:14 +02:00
Metin Doslu 54a277ff01 Add disable/enable trigger all support 2017-03-29 22:00:14 +03:00
Önder Kalacı 95e43eb256 Merge pull request #1261 from citusdata/fix_wrong_pushdown_properly
Fix pushing down wrong queries for INSERT ... SELECT queries
2017-03-24 12:52:31 +02:00
Onder Kalaci 11665dbe3c Fix pushing down wrong queries for INSERT ... SELECT queries
Before this commit, in certain cases router planner allowed pushing
down JOINs that are not on the partition keys.

With @anarazel's suggestion, we change the logic to use uninstantiated
parameter. Previously, the planner was traversing on the restriction
information and once it finds the parameter, it was replacing it with
the shard range. With this commit, instead of traversing the restrict
infos, the planner explicitly checks for the equivalence of the relation
partition key with the uninstantiated parameter. If finds an equivalence,
it adds the restrictions. In this way, we have more control over the
queries that are pushed down.
2017-03-24 11:37:35 +02:00
Ozgun Erdogan 6fbd8e27c3 Merge pull request #1295 from citusdata/ozgune-readme-step-numbering
Minor update README.md to fix the numbers in Docker installation steps.
2017-03-23 14:52:26 -07:00
Ozgun Erdogan 1285cabf28 Update README.md
Updated the Local Cluster steps to include the right numbering.
2017-03-23 11:00:32 -07:00
Jason Petersen dc8c12f8b0 Merge pull request #1278 from citusdata/master_ddl_first
Execute DDL on coordinator before workers

cr: @metdos, @anarazel
2017-03-22 17:45:06 -06:00
Jason Petersen 34a62abb7d
Address code review comments 2017-03-22 17:29:17 -06:00
Jason Petersen d95b5bbad3
Rework ReplicateGrantStmt to use new flow
This was the impetus for the previous commit that changed from using a
DDLJob * to a List * of them.
2017-03-22 17:29:16 -06:00
Jason Petersen 23f5e4282d
Change DDLJob usage to be wrapped in lists
To prepare for GRANT fixes.
2017-03-22 17:29:16 -06:00
Jason Petersen 42c799faee
Fix MX tests
Missed some of these. One had a bad DDL statement to begin with (mixed
up column type and column name) and other was just master/worker order.
2017-03-22 17:21:49 -06:00
Jason Petersen f181b24859
Move worker execution to after master, fix tests
Some tests relied on worker errors though local commands were invalid.
Fixed those by ensuring preconditions were met to have command work
correctly. Otherwise most test changes are related to slight changes
in local/remote error ordering.
2017-03-22 17:21:49 -06:00
Jason Petersen 419a4c3745
Remove execution from stmt-specific util functions
Now have a single Execute call in the main body.
2017-03-22 17:21:49 -06:00
Jason Petersen a64165767d
Rename Process*Stmt functions to Plan*Stmt
To reflect their new purpose planning a DDLJob rather than fully
processing a distributed DDL statement.
2017-03-22 17:21:49 -06:00
Jason Petersen a02a2a90c7
Refactor ExecuteDistDDLCommand to expect struct
Will let us separate out the determination of what to execute from its
actual execution.
2017-03-22 17:21:49 -06:00
Jason Petersen 2cb34406d1
Minor permissions test fix
When running under Enterprise, some of the GRANT commands and whatnot
are propagated. Guarding that section with a call to disable DDL prop.
fixes everything.
2017-03-22 17:07:05 -06:00
Jason Petersen 823cd0dc98 Merge pull request #1281 from citusdata/fix_permission_check
Fix access permission checks for distributed relations

cr: @jasonmp85
2017-03-22 15:35:59 -06:00
Metin Doslu 404e32cdb4
Add basic permission checking tests 2017-03-22 15:25:00 -06:00
Metin Doslu bcff6aa96c
Update regression tests for changing explain output 2017-03-22 15:25:00 -06:00
Metin Doslu b1ee7ec93e
Fix access permission checks for distributed relations
With this commit, we add the range table list of the original query to our
custom plan. Therefore, PostgreSQL can check relations in the original query
for access permissions and error out if the proper access is not granted.
2017-03-22 15:25:00 -06:00
Jason Petersen 1fa2a25695 Set tab size for GitHub display
Hooray!
2017-03-22 13:03:39 -06:00
Murat Tuncer 4e5736a09d Merge pull request #1142 from citusdata/bugfix/750_router_modify_errors
Rephrase router modify errors
2017-03-16 14:52:25 +02:00
Murat Tuncer c4734d7d94 Rephrase router modify errors
generic "distributed modifications must target exactly one shard"
message is replaced by more context aware error messages.
2017-03-16 15:09:10 +03:00
Burak Velioglu 729272aa53 Merge pull request #1267 from citusdata/add_udf_to_get_size_of_table
Add udfs to get size of table
2017-03-16 15:02:11 +03:00
velioglu e32aff1a26 Size UDFs implemented
citus_table_size, citus_relation_size and citus_total_relation_size UDFs are implemented.
2017-03-16 13:50:30 +03:00
Metin Döşlü d9c08c10f4 Merge pull request #1185 from citusdata/custom_plan
Use CustomScan API for query execution
2017-03-14 11:39:16 +02:00
Metin Doslu 1f838199f8 Use CustomScan API for query execution
Custom Scan is a node in the planned statement which helps external providers
to abstract data scan not just for foreign data wrappers but also for regular
relations so you can benefit your version of caching or hardware optimizations.
This sounds like only an abstraction on the data scan layer, but we can use it
as an abstraction for our distributed queries. The only thing we need to do is
to find distributable parts of the query, plan for them and replace them with
a Citus Custom Scan. Then, whenever PostgreSQL hits this custom scan node in
its Vulcano style execution, it will call our callback functions which run
distributed plan and provides tuples to the upper node as it scans a regular
relation. This means fewer code changes, fewer bugs and more supported features
for us!

First, in the distributed query planner phase, we create a Custom Scan which
wraps the distributed plan. For real-time and task-tracker executors, we add
this custom plan under the master query plan. For router executor, we directly
pass the custom plan because there is not any master query. Then, we simply let
the PostgreSQL executor run this plan. When it hits the custom scan node, we
call the related executor parts for distributed plan, fill the tuple store in
the custom scan and return results to PostgreSQL executor in Vulcano style,
a tuple per XXX_ExecScan() call.

* Modify planner to utilize Custom Scan node.
* Create different scan methods for different executors.
* Use native PostgreSQL Explain for master part of queries.
2017-03-14 12:17:51 +02:00
Andres Freund 52358fe891 Initial temp table removal implementation 2017-03-14 12:09:49 +02:00
Jason Petersen 6f4886cd11
Revert "Remove unused SendCommandToWorker"
This reverts commit c8c308c109.
2017-03-13 15:48:51 -06:00
Murat Tuncer 1599e943e7 Merge pull request #1272 from citusdata/router_planner_range_partitioned
Enable router planner for queries on range partitioned table
2017-03-09 16:18:12 +02:00
Murat Tuncer f657a744d5 Enable router planner for queries on range partitioned tables
Router planner now supports queries using range partitioned
tables. Queries on append partitioned tables are still not
supported.
2017-03-09 16:39:15 +03:00
Jason Petersen e060252431 Merge pull request #1263 from citusdata/docker-engine
Newer docker installation instructions

cr: @jasonmp85
2017-03-08 16:18:49 -07:00
Joe Nelson b2dd568dba
Use curl everywhere and prevent nested shell session 2017-03-08 15:43:26 -07:00
Joe Nelson 0aec20c8b3
More consistent references to Docker products 2017-03-08 15:43:26 -07:00
Joe Nelson f5ce760ad3
Link to (for now) newest docker-compose binary 2017-03-08 15:43:26 -07:00
Joe Nelson a86398fbe3
Make outermost list ordered to emphasize the sequence 2017-03-08 15:43:25 -07:00
Joe Nelson e8ef19ed30
Docker download url has changed 2017-03-08 15:43:25 -07:00
Joe Nelson 02129b1860
Link to the new tutorial as well 2017-03-08 15:43:25 -07:00