Commit Graph

439 Commits (6f51aa6e92a8fa6229c021132668dfd9f9a38236)

Author SHA1 Message Date
Marco Slot 6f51aa6e92 Merge pull request #819 from robin900/handle-repartitions-by-typname
During repartitions use partitionColumnType as ::regtype so that UDTs work
2016-10-03 19:50:45 +02:00
Robin Thomas 1e80d27585 During repartitions, the partitionColumnType argument sent to workers
is now a `::regtype` using the qualified name of the column type,
not the column type OID which may differ between master/worker nodes.
Test coverage of a hash reparitition using a UDT as the join column.

Note that the UDFs `worker_hash_partition_table` and `worker_range_partition_table`
are unchanged, and rightly expect an OID for the column type; but the
planner code building the commands now allows for `::regtype` casting
to do its magic.

Fixes citusdata/citus#111.
2016-10-03 13:41:20 -04:00
Marco Slot a378b9e8a9 Merge pull request #808 from robin900/partial-index-tests
Added test coverage for partial unique indexes, exclusion constraints
2016-10-03 17:32:16 +02:00
Robin Thomas de5242fa41 Added test coverage for partial unique indexes and exclude constraints. 2016-10-03 10:47:30 -04:00
Eren Başak 10b06da429 Merge pull request #825 from citusdata/fix_command_counter_increment_wrong_place
Fix command counter increment bug
2016-10-03 17:16:58 +03:00
Eren Basak d169caf637 Fix command counter increment bug
Fixes citusdata/citus#714

On `InsertShardRow`, we previously called `CommandCounterIncrement()` before
`CitusInvalidateRelcacheByRelid(relationId);`. This might prevent to skip
invalidation of the distributed table in the next access within the same session.
2016-10-03 17:00:27 +03:00
Eren Başak 13dbe1ecb4 Merge pull request #742 from citusdata/feature/task_tracker_folders
Differentiate worker and master job temporary folders - MX Backport
2016-10-03 14:29:54 +03:00
Onder Kalaci 727bed9d69 Differentiate worker and master job temporary folders
This commit enables to create different worker and master temporary folders.
This change is important for citus-mx on task-tracker execution. In simple words,
on citus-mx, the worker could actually be reponsible for the master tasks as well.
Prior to this change, both master and worker logic on task-tracker executor was
accessing and using the same files for different purposes which was dangerous on
certain cases (i.e., when task_tracker_delay is low).
2016-10-03 14:24:08 +03:00
Jason Petersen 28a7d769cb Merge pull request #824 from citusdata/use_lock_tranches
Move task tracker lwlocks into their own tranche

cr: @anarazel
2016-09-30 16:11:11 -06:00
Andres Freund 5c02c7dd49 Move task tracker lwlocks into their own tranche.
RequestAddinLWLocks()/LWLockAssign() are gone in 9.6. Luckily all citus
supported postgres versions support tranches, so use those.
2016-09-30 16:06:49 -06:00
Jason Petersen 5a57d7f568 Merge pull request #823 from citusdata/update_postgresql_files
Update PostgreSQL-sourced files with latest changes

cr: @anarazel
2016-09-30 16:06:28 -06:00
Jason Petersen 2a3d8b2913 Remove references to 9.4
Some still lingered.
2016-09-29 17:35:19 -06:00
Jason Petersen 53cd06d4fc Remove alternate multi_hash test file
This was made irrelevant by Citus v5.1.0.
2016-09-29 16:43:19 -06:00
Jason Petersen f4210e1f0e Remove references to PostgreSQL 9.4 support files
No longer extant.
2016-09-29 15:54:38 -06:00
Jason Petersen 5784240df3 Remove gitattributes for csql files
This was missed before.
2016-09-29 15:54:38 -06:00
Jason Petersen 44a5337abd Remove unused dumputils.h header
Believe this was used by csql, which is now gone.
2016-09-29 15:54:38 -06:00
Jason Petersen 44c7626f0c Update ruleutils_95 with latest PostgreSQL changes
Hand-applied changes from a diff I generated between 9.5.0 and 9.5.4.
2016-09-29 15:54:38 -06:00
Marco Slot 9dcba97998 Merge pull request #815 from citusdata/bugfix/count_null
Make count return 0 if all shards are pruned away
2016-09-29 20:32:46 +02:00
Marco Slot 2dfe17b75e Make count return 0 if all shards are pruned away
Before this change, count on a distributed returned NULL if all shards
were pruned away, because on the master we replace with count(..) call
with a sum(..) call to sum the counts from the shards. However, sum
returns NULL when there are no rows, whereas count is expected to return
0.
2016-09-29 20:27:26 +02:00
Jason Petersen 926ed89e9f Merge pull request #818 from citusdata/fix_xact_callbacks
Directly register transaction callbacks in PG_init

cr: @anarazel
2016-09-29 11:52:03 -06:00
Jason Petersen 5375683919 Directly register multi-shard callbacks in PG_init
I had changed these callbacks to use the same method I chose for the
router executor (for consistency), but as that method is flawed, we now
want to ensure we directly register them from PG_init as well.
2016-09-29 11:43:19 -06:00
Jason Petersen f82e17172e Directly register router xact callbacks in PG_init
Not entirely sure why we went with the shared memory hook approach, but
it causes problems (multiple registration) during crashes. Changing to
a simple direct registration call from PG_init.
2016-09-29 11:43:18 -06:00
Burak Yücesoy 89527056e5 Merge pull request #785 from citusdata/colocation_features
Internal co-location API
2016-09-29 12:43:02 +03:00
Burak Yucesoy 1a618b9c43 Internal co-location API
With this commit we introduce internal API for co-location related operations.
2016-09-29 11:56:53 +03:00
Jason Petersen fac938b224 Merge pull request #814 from citusdata/copy_to_distributed_table_final_goodbye
Remove copy_to_distributed_table

cr: @jasonmp85
2016-09-28 11:32:08 -06:00
Marco Slot fe900581cd Remove copy_to_distributed_table 2016-09-28 11:27:54 -06:00
Murat Tuncer b7d4f99d80 Merge pull request #806 from citusdata/fix_805_where_false
Make join queries with where false clauses router plannable
2016-09-28 18:54:19 +03:00
Murat Tuncer ba3d035b23 Make where false queries router plannable 2016-09-28 18:49:26 +03:00
Murat Tuncer 49495f2ed2 Merge pull request #784 from citusdata/fix_594_shard_refresh
Add UDF master_expire_table_cache
2016-09-28 12:13:01 +03:00
Murat Tuncer 3ef841c67b Add UDF master_expire_table_cache 2016-09-28 12:08:37 +03:00
Jason Petersen b029ef7a5d Merge pull request #812 from citusdata/fix_uniq_constraint_segfault
Fix unique-violation-in-xact segfault

cr: @anarazel
2016-09-27 16:51:48 -06:00
Jason Petersen f9e63097c9 Fix unique-violation-in-xact segfault
An interaction between ReraiseRemoteError and DML transaction support
causes segfaults:

  * ReraiseRemoteError calls PurgeConnection, freeing a connection...
  * That connection is still in the xactParticipantHash

At transaction end, the memory in the freed connection might happen to
pass the "is this connection OK?" check, causing us to try to send an
ABORT over that connection. By removing it from the transaction hash
before calling ReraiseRemoteError, we avoid this possibility.
2016-09-27 16:44:03 -06:00
Metin Döşlü 33b91bbf8e Merge pull request #770 from citusdata/fix/insert_query_inside_plpgsql
Pass text oid instead of invalid oid for null values
2016-09-27 08:46:04 +03:00
Metin Doslu db64995353 Pass text oid inteads of invalid oid for null values
Passing invalid oids even for null values in PQsendQueryParams() causes worker
nodes to fail. Therefore, we pass text oid for null values.
2016-09-27 08:15:46 +03:00
Jason Petersen 5047f325db Merge pull request #776 from citusdata/feature/no-movement
Support NoMovement direction in router executor

cr: @jasonmp85
2016-09-26 18:32:33 -06:00
Andres Freund 5e01434402 Support NoMovement direction in router executor
This is mainly interesting because it allows to use RETURN QUERY/RETURN
QUERY EXECUTE and FOR ... IN .. LOOPs in plpgsql.
2016-09-26 18:28:36 -06:00
Jason Petersen 6708d0d59f Merge pull request #721 from citusdata/feature_truncate
Add truncate support for distributed tables

cr: @jasonmp85
2016-09-26 18:27:52 -06:00
Murat Tuncer fb74e08fa5 Add tests with spaces in table names 2016-09-26 18:23:43 -06:00
Murat Tuncer 680fab2b67 Remove extra space 2016-09-26 18:23:43 -06:00
Murat Tuncer 25a95d57f8 Refactor SendQueryToPlacements api 2016-09-26 18:23:43 -06:00
Murat Tuncer a342cacfc4 Address feedback 2016-09-26 18:23:42 -06:00
Murat Tuncer 66069ed610 Fix regression test failures after rebase 2016-09-26 18:23:42 -06:00
Murat Tuncer 4416b77088 Add support for truncate statement 2016-09-26 18:23:42 -06:00
Marco Slot 62c65e661b Merge pull request #804 from citusdata/bugfix/join_filter_crash
Fix segmentation fault in case of joins with WHERE false
2016-09-26 15:23:57 +02:00
Marco Slot a2276adcd2 Fix segmentation fault in case of joins with WHERE 1=0 2016-09-26 15:12:29 +02:00
Eren Başak 9bbba8a12c Merge pull request #749 from robin900/forbid-exclusion-constraints
Handle EXCLUDE constraints properly on distributed tables
2016-09-22 11:37:25 +03:00
Robin Thomas 6880efce5b Forbid EXCLUDE constraints on distributed tables just as we forbid
UNIQUE or PRIMARY KEY constraints. Also, properly propagate valid
EXCLUDE constraints to worker shard tables.

If an EXCLUDE constraint includes the distribution column,
the operator must be an equality operator.
Tests in regression suite for exclusion constraints that include
the partition column, omit it, and include it but with non-equality
operator. Regression tests also verify that valid exclusion constraints
are propagated to the shard tables. And the tests work in different
timezones now.

Fixes citusdata/citus#748 and citusdata/citus#778.
2016-09-21 14:02:42 -04:00
Metin Döşlü e381b21cc5 Merge pull request #777 from citusdata/remove_pg_toast_from_regression_tests
Remove pg_toast_* references from regression tests
2016-09-10 10:32:02 +03:00
Metin Doslu 80a833aeb3 Remove pg_toast_* references from regression tests
pg_toast_* oids are constantly changing, and this causes regression tests to
fail time to time. With this commit, we remove all of the pg_toast_* references
from regression test outputs.
2016-09-09 11:31:51 +03:00
Jason Petersen c2b07dccab Merge pull request #764 from citusdata/feature/allow_multi_ddl_xact_block
Permit multiple DDL commands in a transaction

cr: @marcocitus
2016-09-08 22:50:07 -05:00