Commit Graph

959 Commits (3c1774678643fd066e77643b350ee341fb3d973e)

Author SHA1 Message Date
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
Burak Yucesoy 7cfcb7d2f8 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
Önder Kalacı b1363aa1d3 Merge pull request #1268 from citusdata/remove_adding_qual_prototype
Replace adding the qual logic with attribute equivalence for INSERT ... SELECT
2017-04-13 13:48:14 +03:00
Onder Kalaci 1cb6a34ba8 Remove uninstantiated qual logic, use attribute equivalences
In this PR, we aim to deduce whether each of the RTE_RELATION
is joined with at least on another RTE_RELATION on their partition keys. If each
RTE_RELATION follows the above rule, we can conclude that all RTE_RELATIONs are
joined on their partition keys.

In order to do that, we invented a new equivalence class namely:
AttributeEquivalenceClass. In very simple words, a AttributeEquivalenceClass is
identified by an unique id and consists of a list of AttributeEquivalenceMembers.

Each AttributeEquivalenceMember is designed to identify attributes uniquely within the
whole query. The necessity of this arise since varno attributes are defined within
a single level of a query. Instead, here we want to identify each RTE_RELATION uniquely
and try to find equality among each RTE_RELATION's partition key.

Whenever we find an equality clause A = B, where both A and B originates from
relation attributes (i.e., not random expressions), we create an
AttributeEquivalenceClass to record this knowledge. If we later find another
equivalence B = C, we create another AttributeEquivalenceClass. Finally, we can
apply transitity rules and generate a new AttributeEquivalenceClass which includes
A, B and C.

Note that equality among the members are identified by the varattno and rteIdentity.

Each equality among RTE_RELATION is saved using an AttributeEquivalenceClass where
each member attribute is identified by a AttributeEquivalenceMember. In the final
step, we try generate a common attribute equivalence class that holds as much as
AttributeEquivalenceMembers whose attributes are a partition keys.
2017-04-13 11:51:26 +03:00
Burak Velioglu 12860b1316 Merge pull request #1318 from citusdata/ltree_copy_branch
Change checks with built-in type (omit ltree)
2017-04-11 14:50:19 +03:00
velioglu 19d0c66fa5 Change checks with built-in type 2017-04-11 14:41:37 +03:00
Burak Velioglu cfc0992137 Merge pull request #1300 from citusdata/ltree_copy_branch
Change copy format of ltree
2017-04-11 08:41:44 +03:00
velioglu 1fb11c738f Check binary output function of type. 2017-04-10 16:28:09 +03:00
Jason Petersen 8c5d0f686b Merge pull request #1277 from citusdata/error_out_incomplete_installation
Error out if binary citus version does not match installed extension

cr: @jasonmp85
2017-04-04 16:49:03 -06:00
Jason Petersen 8b4620ef16
Use RESET for GUC test, not reconnect
More limited in what it does, better test.
2017-04-04 16:40:17 -06:00
Jason Petersen 7e46f41c12
Add comments, use strncmp, clean up GUC desc.
Good to go!
2017-04-04 16:16:49 -06:00
Jason Petersen 033fda9183
Clean up remaining error messages
Added details and hints, based off of similar PostgreSQL scenarios.
2017-04-04 16:11:59 -06:00
Jason Petersen ef81b21a49
Clean up ErrorIfUnstableCreateOrAlterExtensionStmt
Swaps an Assert in for an ereport, and adds details and hints to the
error message to help users with a possibly confusing scenario.
2017-04-04 15:58:57 -06:00
Jason Petersen ad3fbd9689
Refactor utility-skip/extn-check code
This was getting pretty long and complex in the context of the main
utility hook. Moved out the checks for what should skip Citus process-
ing and what should have version checks performed.
2017-04-04 15:07:22 -06:00
Burak Yucesoy a09614553f Add enable_version_checks GUC and address feedback 2017-04-04 19:11:13 +03:00