Commit Graph

1135 Commits (e0c960e248f873513d5aca8f7933b6b9e0909c6b)

Author SHA1 Message Date
Marco Slot e0c960e248 Use consistent placement IDs in mulity_modyfing_xactstest 2017-07-12 14:16:23 +02:00
Marco Slot 4ffc5b850a Merge pull request #1462 from citusdata/clean-regress-multi
Remove unused line, @arguments was set but never used
2017-07-12 14:14:21 +02:00
Brian Cloutier 0d0235cad5 Remove unused line, @arguments was set but never used 2017-07-12 13:46:27 +02:00
Marco Slot 40b69e9ec4 Merge pull request #1455 from citusdata/join_xact_modification_levels
Rework connection API to remove transaction restrictions
2017-07-12 12:49:54 +02:00
Marco Slot aeca4b7a11 Clarify placement connection error messages 2017-07-12 11:59:19 +02:00
Marco Slot b7a935b282 Remove XactModificationLevel distinction between DML and multi-shard 2017-07-12 11:59:19 +02:00
Marco Slot 74985f3361 Use GetPlacementListConnection for router DML 2017-07-12 11:26:23 +02:00
Marco Slot 4c9ede29a3 Use GetPlacementListConnection for multi-shard commands 2017-07-12 11:26:22 +02:00
Marco Slot 701b604c77 Use GetPlacementListConnection for router SELECTs 2017-07-12 11:26:22 +02:00
Marco Slot 98eb817568 Allow choosing a connection for multiple placements with GetPlacementListConnection 2017-07-12 11:26:22 +02:00
Jason Petersen d7c2e6ab99 Bump to the latest Citus Tools
Gets the new uncrustify configuration.
2017-07-11 16:30:03 -06:00
Jason Petersen 89b0c69e6b Indentation cleanup
Uncrustify 0.65 appears to have changed some defaults, resulting in
breakages for those of us who have already upgraded; Travis still uses
Uncrustify 0.64, but these changes work with both versions (assuming
appropriately updated config), so this should permit use of either
version for the time being.
2017-07-11 15:59:28 -06:00
Jason Petersen a7317564ea Add some test outputs to gitignore
These were bothering me.
2017-07-11 15:37:32 -06:00
Burak Yücesoy 917e334778 Merge pull request #1488 from citusdata/fix_conflicting_vacuum_insert
Fix conflicting locks in VACUUM and INSERT
2017-07-10 16:00:59 +03:00
Burak Yucesoy 33c2c97c6a Add tests for concurrent INSERT and VACUUM behaviour 2017-07-10 15:46:48 +03:00
Burak Yucesoy d4996ad438 Remove LockRelationDistributionMetadata function 2017-07-10 15:46:37 +03:00
Burak Yucesoy c213647ab2 Use ShareUpdateExclusiveLock instead ShareLock in VACUUM
Before this change, we used ShareLock to acquire lock on distributed tables while
running VACUUM. This makes VACUUM and INSERT block each other. With this change we
changed lock mode from ShareLock to ShareUpdateExclusiveLock, which does not conflict
with the locks INSERT acquire.
2017-07-10 15:46:19 +03:00
Murat Tuncer 1432846da7 Replace duplicate code and call check_functions_in_node (#1478)
MasterIrreducibleExpressionWalker has a copied code from
function check_functions_in_node() which was available with
PG 9.6+. Now PG 9.5 support is dropped we can remove
duplicate code and directly call check_functions_in_node().
2017-07-07 10:19:33 +03:00
Marco Slot b3d70aa92d Merge pull request #1487 from citusdata/prepared_implicit_casts
Evaluate implicit casts in prepared statements
2017-07-06 21:49:03 +02:00
Marco Slot e2091ae96a Handle implicit casts in prepared INSERTs 2017-07-06 16:17:35 +02:00
Andres Freund 772d6827dc Merge pull request #1473 from citusdata/fix/cancellation
Fix issues around statement cancellation and connection closure.
2017-07-04 14:58:23 -07:00
Andres Freund 13b86623fd Add tests for statement cancellation. 2017-07-04 14:46:03 -07:00
Andres Freund e171d5363e Don't wait for statement completion when aborting coordinated transaction.
Previously we used ForgetResults() in StartRemoteTransactionAbort() -
that's problematic because there might still be an ongoing statement,
and this causes us to wait for its completion.  That e.g. happens when
a statement running on the coordinator is cancelled.
2017-07-04 14:46:03 -07:00
Andres Freund aa1008238c Cancel statements when closing connection at transaction end.
That's important because the currently running statement on a worker
might continue to hold locks and consume resources, even after the
connection is closed.  Unfortunately postgres will only notice closed
connections when reading from / writing to the network. That might
only happen much later.
2017-07-04 14:46:03 -07:00
Andres Freund b62d94379d Add NonblockingForgetResults().
This is very similar to ForgetResults() except that no network IO is
performed. Primarily useful in error handling cases.
2017-07-04 14:46:03 -07:00
Andres Freund dba9fa5df0 Add ShutdownConnection() which cancels statement before closing connection.
That's primarily useful in error cases, where we want to make sure
locks etc held by commands running on workers are released promptly.
2017-07-04 14:46:03 -07:00
Andres Freund e6d1927567 Always use connections in non-blocking mode.
Now that there's no blocking libpq callers left, default to using
non-blocking mode in connection_management.c.  This has two
advantages:
1) Blockiness doesn't have to frequently be reset, simplifying code
2) Prevents accidental use of blocking libpq functions, since they'll
   frequently return 'need IO'
2017-07-04 14:46:03 -07:00
Andres Freund c2c16ce438 Move multi_copy.c to interrupt aware libpq wrappers. 2017-07-04 14:46:03 -07:00
Andres Freund a8602cbd07 Move multi_client_executor to interrupt aware libpq wrappers. 2017-07-04 12:38:52 -07:00
Andres Freund 52cb6fb304 Move citus tools to interrupt aware libpq wrappers. 2017-07-04 12:38:52 -07:00
Andres Freund 567a6cbd16 Add interrupt aware PQputCopy{End,Data} wrappers. 2017-07-04 12:38:52 -07:00
Andres Freund e296f470c2 Move interrupt handling code from GetRemoteCommandResult to FinishConnectionIO.
Nearby commits will add additional interrupt handling functions, this
way we don't have to duplicate the code.
2017-07-04 12:38:52 -07:00
Andres Freund b4fa32dd6d Fix copy & pasto in WARNING message. 2017-07-04 12:38:52 -07:00
Andres Freund 3d8e295041 Fix memory leak in RemoteFinalizedShardPlacementList(). 2017-07-04 12:38:52 -07:00
Andres Freund e190cdf77e Fix some trailing whitespace. 2017-07-04 12:38:52 -07:00
Burak Velioglu 78eb98e81d Merge pull request #1266 from citusdata/fix_shard_name
Change shard_name UDF to include schema
2017-07-04 11:01:52 +03:00
Marco Slot 1ed7976cb9 Change implementation of shard_name UDF to get schema-qualified shard name 2017-07-04 10:49:40 +03:00
Marco Slot 150f861dbf Merge pull request #1469 from citusdata/move_insert_select
Move INSERT ... SELECT planning logic into one place
2017-06-29 16:50:01 +02:00
Marco Slot 290f9a6301 Move INSERT ... SELECT planning logic into one place 2017-06-29 15:03:14 +02:00
Önder Kalacı ad4f94bb7e Merge pull request #1463 from citusdata/partition_distributed_table_utils
Add some utility functions for partitioned tables
2017-06-28 09:50:30 +03:00
Onder Kalaci dc9b63504e Add some utility functions for partitioned tables
This commit is intended to be a base for supporting declarative partitioning
on distributed tables. Here we add the following utility functions and their
unit tests:

  * Very basic functions including differnentiating partitioned tables and
    partitions, listing the partitions
  * Generating the PARTITION BY (expr) and adding this to the DDL events
    of partitioned tables
  * Ability to generate text representations of the ranges for partitions
  * Ability to generate the `ALTER TABLE parent_table ATTACH PARTITION
    partition_table FOR VALUES value_range`
  * Ability to apply add shard ids to the above command using
    `worker_apply_inter_shard_ddl_command()`
  * Ability to generate `ALTER TABLE parent_table DETACH PARTITION`
2017-06-28 09:39:55 +03:00
Andres Freund e3dc462b93 Merge pull request #1470 from citusdata/remove_95
Remove 9.5 support.
2017-06-27 14:00:29 -07:00
Andres Freund 99795dc7c5 Update CONTRIBUTING.md to default to 9.6.
9.5 was not supported anymore, and 10 is not released yet. So 9.6
seems appropriate for now.
2017-06-26 18:09:23 -07:00
Andres Freund 3ab288bf66 Remove version check from pg_regress_multi.pl
The check is not necessary anymore after f59cf2b818.
2017-06-26 18:07:43 -07:00
Andres Freund 80483bcab2 Remove 9.5 references from comments in schedule files.
Replace with version-less reference, no point in repeating this for
every release.
2017-06-26 18:04:32 -07:00
Andres Freund 82b7cf7a8e fixup! Remove 9.5 specific C files. 2017-06-26 17:36:58 -07:00
Andres Freund 1a728f747b Remove 9.5 regression test output files. 2017-06-26 12:17:46 -07:00
Andres Freund c9c26ad81f Remove 9.5 related node wrappers.
Now that all branches support the extensible node infrastructure, we
don't need our wrappers anymore.
2017-06-26 08:46:32 -07:00
Andres Freund 7733154be0 Fix code only enabled for 9.5.
There's still supporting wrappers used, a subsequent commit will
remove those.

This also removes the already unused tuplecount_t define.
2017-06-26 08:46:32 -07:00
Andres Freund 0f3d41702e Remove 9.5 specific C files. 2017-06-26 08:46:32 -07:00