Commit Graph

1123 Commits (d896fe7995cdca52c33ea0258d93ece0178a6502)

Author SHA1 Message Date
Andres Freund 52571c00ad Build DistTableCacheEntry->shardIntervalCompareFunction even for 0 shards.
Previously we, unnecessarily, used a the first shard's type
information to to look up the comparison function.  But that
information is already available, so use it.  That's helpful because
we sometimes want to access the comparator function even if there's no
shards.
2017-04-28 14:40:38 -07:00
Andres Freund ba93d32c8a Fix: Make FindShardIntervalIndex robust against 0 shards. 2017-04-28 14:40:38 -07:00
Metin Döşlü 59ecf9faa0 Merge pull request #1361 from citusdata/explain_with_savepoint
Send explain queries with savepoints
2017-04-28 13:43:27 -07:00
Metin Doslu b6659bec22 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 905ca98a9b 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 93e3afc25c
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 42ee7c05f5
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 d70312ddc1 Merge pull request #1351 from citusdata/feature/remove_pruning_debug
Remove Pruning Debug Output
2017-04-26 11:58:52 -07:00
Andres Freund 1f93c325fa 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 b0585c7df6 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 b7dfeb0bec 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 e637fd802d 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 71a7f39b05 Skip exhaustive test in CoPartitionedTables() if declared colocated.
That's considerably cheaper.
2017-04-26 11:19:17 -07:00
Andres Freund 1798d4648d 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 3c17746786 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 7f9e80db10 Only process error if not NULL in StoreErrorMessage 2017-04-21 17:01:01 +02:00
Marco Slot 7faf4657b7 Use right sizeof in UpdateRelationColocationGroup 2017-04-21 16:37:09 +02:00
Burak Yücesoy 5fafde441d 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 5de61ebf78 Configure valgrind command line arguments 2017-04-21 16:30:12 +03:00
Burak Yucesoy d6cb88a73a Stabilize test outputs 2017-04-21 16:08:52 +03:00
Eren Basak abc84e6b2b 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 c8fec3be1b 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 4ed093970a Support expressions in the partition column in INSERTs 2017-04-21 14:05:52 +02:00
Burak Velioglu 701aaccd9c Merge pull request #1292 from citusdata/alter_add_constraint_m
Alter Table Add Constraint
2017-04-20 15:33:02 +03:00
velioglu 24d24db25c Implement ALTER TABLE ADD CONSTRAINT command 2017-04-20 15:02:33 +03:00
Burak Velioglu fbb6a47adf Merge pull request #1316 from citusdata/add_guc_for_cross_shard
Log cross-shard queries
2017-04-20 14:08:21 +03:00
velioglu 8cbef819be Log message of across shard queries according to the log level 2017-04-20 12:24:46 +03:00
Burak Velioglu 0d987636a3 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 2327b63291 Change native hash function with worker_hash 2017-04-19 22:16:55 +03:00
Jason Petersen eef4ed31cb 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 5272c2c44b
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 ecddb78815 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 3d99cdfcc7 Add basic read-only transaction tests 2017-04-18 11:42:33 +02:00
Marco Slot f838c83809 Remove redundant pg_dist_jobid_seq restarts in tests 2017-04-18 11:42:32 +02:00
Marco Slot 40829c2ba9 Set citus.enable_unique_job_ids in tests with job ID in output 2017-04-18 11:42:32 +02:00
Marco Slot dfd7d86948 Stop using a sequence to generate unique job IDs 2017-04-18 11:31:51 +02:00
Burak Yücesoy be6dfaa596 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 00747dc8c9 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 f5a406a23e Merge pull request #1326 from citusdata/fix_node_copy_error
Fix node copy error
2017-04-17 09:19:55 -08:00
Burak Yucesoy 1a56b99f13 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 acb84d9ca3 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 4615100da5 Fix table in name in prepared statement regression tests 2017-04-17 16:17:30 +02:00
Marco Slot af0e462409 Support UPDATE/DELETE with parameterised partition column qual 2017-04-17 16:17:30 +02:00
Marco Slot 87426b95be 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 5e58804d44 Support query parameters in combination with function evaluation 2017-04-17 15:40:55 +02:00
Marco Slot dd75c5308f 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 0bcc227a62 Create indexes after worker_append_table_to_shard during shard repair 2017-04-17 15:17:21 +02:00
Burak Yücesoy 24ee65a054 Merge pull request #1283 from citusdata/decouple_activate
Decouple reference table replication
2017-04-17 02:48:15 -08:00
Burak Yucesoy e9095e62ec 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 7097336972 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