Commit Graph

972 Commits (99642306eda8c711470eb2cb7afe8c8686d64852)

Author SHA1 Message Date
Andres Freund 99642306ed Fix: Make FindShardIntervalIndex robust against 0 shards. 2017-04-28 14:40:38 -07:00
Metin Döşlü 669b5e243f Merge pull request #1361 from citusdata/explain_with_savepoint
Send explain queries with savepoints
2017-04-28 13:43:27 -07:00
Metin Doslu d411892fe6 Send explain queries with savepoints
With this commit, we started to send explain queries within a savepoint. After
running explain query, we rollback to savepoint. This saves us from side effects
of EXPLAIN ANALYZE on DML queries.
2017-04-28 12:13:48 -07:00
Jason Petersen a5ad70379b Merge pull request #1353 from citusdata/fix_copy_crasher
Refactor COPY to not directly use cache entry

cr: @marcocitus
2017-04-27 16:06:11 -06:00
Jason Petersen 1c353e68aa Remove FastShardPruning method
With the other simplifications, it doesn't make sense to keep around.
2017-04-27 13:32:36 -06:00
Jason Petersen 06497d74f5 Refactor FindShardInterval to use cacheEntry
All callers fetch a cache entry and extract/compute arguments for the
eventual FindShardInterval call, so it makes more sense to refactor
into that function itself; this solves the use-after-free bug, too.
2017-04-27 13:32:36 -06:00
Andres Freund 9cefa97972 Merge pull request #1351 from citusdata/feature/remove_pruning_debug
Remove Pruning Debug Output
2017-04-26 11:58:52 -07:00
Andres Freund 4fe14bdeda Some cleanup in multi_subquery test.
Remove trailing whitespace and use of EXPLAIN instead of
EXPLAIN (COSTS OFF).
2017-04-26 11:33:56 -07:00
Andres Freund f064c33d5c Add back pruning coverage lost in last commit.
Because we can't rely on the debuggin message anymore, add a bunch of
explain statements that roughly fulfill the same purpose.
2017-04-26 11:33:56 -07:00
Andres Freund 5b389eb6d7 Boring regression test output adjustments.
Soon shard pruning will be optimized not to generally work linearly
anymore.  Thus we can't print the pruned shard intervals as currently
done anymore.

The current printing of shard ids also prevents us from running tests
in parallel, as otherwise shard ids aren't linearly numbered.
2017-04-26 11:33:56 -07:00
Andres Freund 8923fe7f54 Merge pull request #1354 from citusdata/feature/faster-copartitioned-check
Skip exhaustive test in CoPartitionedTables() if declared colocated.
2017-04-26 11:33:31 -07:00
Andres Freund 9e4ec991d8 Skip exhaustive test in CoPartitionedTables() if declared colocated.
That's considerably cheaper.
2017-04-26 11:19:17 -07:00
Andres Freund c34e357885 Merge pull request #1350 from citusdata/fix/vpath-builds
Fix VPATH builds broken in 087d8427e3.
2017-04-25 16:25:54 -07:00
Andres Freund 5524d389cb Fix VPATH builds broken in 087d8427e3.
1) Generated files reside in the build directory, not the source
   directory.
2) As a generated file is now included in the build, add it to the
   include path (-I)
2017-04-25 16:04:42 -07:00
Marco Slot 1b4ebd490d Only process error if not NULL in StoreErrorMessage 2017-04-21 17:01:01 +02:00
Marco Slot 326f8d9d61 Use right sizeof in UpdateRelationColocationGroup 2017-04-21 16:37:09 +02:00
Burak Yücesoy e291887227 Merge pull request #1294 from citusdata/fix_test_outputs_for_valgrind
Prepare for valgrind automation
2017-04-21 05:51:14 -08:00
Burak Yucesoy a35d0cd8af Configure valgrind command line arguments 2017-04-21 16:30:12 +03:00
Burak Yucesoy 9312ef8bcf Stabilize test outputs 2017-04-21 16:08:52 +03:00
Eren Basak 71d99b72ce Add support for proper valgrind tests
This change allows valgrind tests (`make check-multi-vg`) to be
run seamlessly without test output errors and timeout problems.
2017-04-21 16:08:52 +03:00
Marco Slot 384f32b191 Merge pull request #1302 from citusdata/serial_partition_column
Support expressions in the partition column in INSERTs
2017-04-21 14:18:13 +02:00
Marco Slot 7d1f7b8923 Support expressions in the partition column in INSERTs 2017-04-21 14:05:52 +02:00
Burak Velioglu 41bb84c9c0 Merge pull request #1292 from citusdata/alter_add_constraint_m
Alter Table Add Constraint
2017-04-20 15:33:02 +03:00
velioglu a26edd2249 Implement ALTER TABLE ADD CONSTRAINT command 2017-04-20 15:02:33 +03:00
Burak Velioglu 5170731848 Merge pull request #1316 from citusdata/add_guc_for_cross_shard
Log cross-shard queries
2017-04-20 14:08:21 +03:00
velioglu 5b3e47de7a Log message of across shard queries according to the log level 2017-04-20 12:24:46 +03:00
Burak Velioglu 1e6e5fd512 Merge pull request #1324 from citusdata/insert_into_select_wo_native
Replace native hash function with worker_hash
2017-04-19 22:30:52 +03:00
velioglu be3cdb14ea Change native hash function with worker_hash 2017-04-19 22:16:55 +03:00
Jason Petersen e619e50590 Merge pull request #1312 from citusdata/rename_support
Enable distributed ALTER TABLE ... RENAME COLUMN

cr: @byucesoy
2017-04-18 22:57:12 -06:00
Jason Petersen f999bcd7ca Enable distributed ALTER TABLE ... RENAME COLUMN
Pretty straightforward. Had some concerns about locking, but due to the
fact that all distributed operations use either some level of deparsing
or need to enumerate column names, they all block during any concurrent
column renames (due to the AccessExclusive lock).

In addition, I had some misgivings about permitting renames of the dis-
tribution column, but nothing bad comes from just allowing them.

Finally, I tried to trigger any sort of error using prepared statements
and could not trigger any errors not also exhibited by plain PostgreSQL
tables.
2017-04-18 22:47:48 -06:00
Marco Slot 065d167d2e Merge pull request #1208 from citusdata/remove_job_id_seq
Stop using a sequence to generate job IDs
2017-04-18 12:02:07 +02:00
Marco Slot 0f63edc5b4 Add basic read-only transaction tests 2017-04-18 11:42:33 +02:00
Marco Slot 53899946e7 Remove redundant pg_dist_jobid_seq restarts in tests 2017-04-18 11:42:32 +02:00
Marco Slot d7a5f6997c Set citus.enable_unique_job_ids in tests with job ID in output 2017-04-18 11:42:32 +02:00
Marco Slot c7603215dd Stop using a sequence to generate unique job IDs 2017-04-18 11:31:51 +02:00
Burak Yücesoy f035885269 Merge pull request #1332 from citusdata/set_isactive_to_true
Set default value of isactive to true
2017-04-17 23:38:45 -08:00
Burak Yucesoy 58a809b0e8 Set default value of isactive to true
With this change, we set to default value of isactive column to true so that
upgrading users all nodes will be marked as active to not break their environment.
2017-04-18 09:40:44 +03:00
Burak Yücesoy 3a8bfa3c41 Merge pull request #1326 from citusdata/fix_node_copy_error
Fix node copy error
2017-04-17 09:19:55 -08:00
Burak Yucesoy 5aefe20725 Fix node copy error
Instead of directly returning heap tuple obtained from heap scan
we return copied version of it.
2017-04-17 19:38:18 +03:00
Marco Slot 24eecde0cc Merge pull request #1320 from citusdata/prepared_update_delete
Support UPDATE/DELETE with parameterised partition column qual
2017-04-17 16:32:37 +02:00
Metin Doslu f45c2c43b5 Fix table in name in prepared statement regression tests 2017-04-17 16:17:30 +02:00
Marco Slot a4c98727be Support UPDATE/DELETE with parameterised partition column qual 2017-04-17 16:17:30 +02:00
Marco Slot 6a50fba3c9 Merge pull request #1321 from citusdata/prepared_function_evaluation
Support query parameters in combination with function evaluation
2017-04-17 16:16:27 +02:00
Marco Slot 2fbe546ddd Support query parameters in combination with function evaluation 2017-04-17 15:40:55 +02:00
Marco Slot c350d428ae Merge pull request #1232 from citusdata/fetch_faster
Create indexes after worker_append_table_to_shard when copying a shard
2017-04-17 15:30:44 +02:00
Marco Slot ccc796cf66 Create indexes after worker_append_table_to_shard during shard repair 2017-04-17 15:17:21 +02:00
Burak Yücesoy fd5ada0ab6 Merge pull request #1283 from citusdata/decouple_activate
Decouple reference table replication
2017-04-17 02:48:15 -08:00
Burak Yucesoy d58cb416a4 Decouple reference table replication
With this change we add an option to add a node without replicating all reference
tables to that node. If a node is added with this option, we mark the node as
inactive and no queries will sent to that node.

We also added two new UDFs;
 - master_activate_node(host, port):
    - marks node as active and replicates all reference tables to that node
 - master_add_inactive_node(host, port):
    - only adds node to pg_dist_node
2017-04-17 13:33:31 +03:00
Burak Yücesoy 8e0795ccb5 Merge pull request #1309 from citusdata/fix_sql_function_returns_wrong_result
Error out on parameterized SQL functions
2017-04-13 06:01:51 -08:00
Burak Yucesoy cd5dc2693d Error out on parameterized SQL functions
Before this commit, we were erroring out for queries containing parameterized SQL functions
like 'SELECT parameterized_sql_query(value)' as we should, however we were returning wrong
results for queries like 'SELECT * FROM parameterized_sql_query(value)'. With this commit
we started to error out on such queries too.
2017-04-13 16:36:24 +03:00