Commit Graph

497 Commits (a1454d0c9b149c42aadef3ad1ffb74813f87668b)

Author SHA1 Message Date
Andres Freund a1454d0c9b Merge cba340ebe9 into 64c8972c19 2016-10-17 16:49:47 +00:00
Eren Başak 64c8972c19 Merge pull request #865 from citusdata/add_pg_dist_local_group_table
Add pg_dist_local_group Metadata Table
2016-10-17 12:02:54 +03:00
Eren Basak f3ede37c9f Add hasmetadata column to pg_dist_node 2016-10-17 11:52:18 +03:00
Eren Basak c7bf2021fa Add metadata infrastructure for pg_dist_local_group table 2016-10-17 11:52:18 +03:00
Eren Basak 8f477d18f1 Add pg_dist_local_group Metadata Table
This change adds the pg_dist_local_group metadata table, which indicates
the group id of the current node. It is expected that this table contains
one and only one row, which only contains the group id of the node as an
integer.
2016-10-14 11:41:14 +03:00
Eren Başak 50569be29c Merge pull request #874 from citusdata/fix_metadata_snapshot_test_placement_id_change
Fix changing placement ids in metadata snapshot test
2016-10-14 11:35:46 +03:00
Eren Basak 630f199d3c Fix changing placement ids in metadata snapshot test 2016-10-14 11:13:16 +03:00
Brian Cloutier 2965331d80 Merge pull request #868 from citusdata/746-drop-shardalias
Drop shardalias
2016-10-14 11:10:54 +03:00
Brian Cloutier 6c3d79b4e7 Drop shardalias 2016-10-14 11:03:26 +03:00
Önder Kalacı d4950ea510 Merge pull request #840 from citusdata/colocated_shard_copy_and_shard_move
Colocation support for master_copy_shard_placement
2016-10-13 18:26:25 +03:00
Burak Yucesoy 6668d19a3b Make shard transfer functions co-location aware
With this change, master_copy_shard_placement and master_move_shard_placement functions
start to copy/move given shard along with its co-located shards.
2016-10-13 18:16:40 +03:00
Metin Döşlü 0fbd19550d Merge pull request #811 from citusdata/having_support
Add HAVING support
2016-10-13 16:05:18 +03:00
Metin Doslu d03a2af778 Add HAVING support
This commit completes having support in Citus by adding having support for
real-time and task-tracker executors. Multiple tests are added to regression
tests to cover new supported queries with having support.
2016-10-13 15:47:53 +03:00
Eren Başak 736c73d008 Merge pull request #799 from citusdata/metadata_sync
Add Metadata Snapshot Infrastructure
2016-10-13 10:47:48 +03:00
Eren Basak ed3af403fd Add Metadata Snapshot Infrastructure
This change adds the required infrastructure about metadata snapshot from MX
codebase into Citus, mainly metadata_sync.c file and master_metadata_snapshot UDF.
2016-10-13 10:40:14 +03:00
Jason Petersen 14315f05a5 Merge pull request #862 from citusdata/vars_for_job_and_task_ids
Use single-quote interpolation in partition test

cr: @marcocitus
2016-10-10 13:16:37 -06:00
Jason Petersen d140d1c934
Use single-quote interpolation in partition test
Noticed an old issue and this outdated comment. Figured I'd fix it.
2016-10-10 13:03:43 -06:00
Andres Freund cba340ebe9 Add overview instructions to transaction_management.c's header. 2016-10-07 19:20:35 -07:00
Andres Freund 3b9826e6e9 Remove obsoleted transaction infrastructure. 2016-10-07 18:06:03 -07:00
Andres Freund a8f9e983a0 Migration COPY to new framework.
This implies several behaviour changes:
- COPY is now transactional
- failure to compute stats for append partitioned tables is an error
2016-10-07 18:06:03 -07:00
Andres Freund 360307f6d5 Move router executor over to new connection & transaction framework.
Note that this changes behaviour in a few edgecases (as demonstrated by
the tests). There's also a few FIXMEs.
2016-10-07 18:06:03 -07:00
Andres Freund 8a6a8fae9b Move WorkerShardStats() to new transaction & connection framework.
That's a prerequisite for transactional COPY. Otherwise, for append
partitioned tables, the WorkerShardStats() triggered during COPY can't
see data. Which, in turn, prevents proper shard pruning.
2016-10-07 18:06:03 -07:00
Andres Freund 0850204bc5 Move DropShards() and master_drop_sequences() to new framework.
This includes parallelizing DropShards, and always using transactions,
which should greatly increase DROP TABLE performance for tables with a
lot of shards.
2016-10-07 18:06:03 -07:00
Andres Freund 8d42d18c81 Parallelize and transactionalize DDL. 2016-10-07 18:06:03 -07:00
Andres Freund 57f2b7c452 Convert master_modify_multiple_shards() to new API. 2016-10-07 18:06:03 -07:00
Andres Freund 81d75901ad Add additional remote command helpers. 2016-10-07 18:06:03 -07:00
Andres Freund 14f73e78b0 Introduce association between placements and connections. 2016-10-07 18:06:03 -07:00
Andres Freund 6ffa0976cf Coordinated remote transaction management. 2016-10-07 18:06:00 -07:00
Andres Freund 3929e322b5 Add initial helpers to make interactions with MultiConnection et al. easier.
This includes basic infrastructure for logging of commands sent to
remote/worker nodes. Note that this has no effect as of yet, since no
callers are converted to the new infrastructure.
2016-10-07 17:46:20 -07:00
Andres Freund 90899e3210 Add beginning of new and central connection lifetime management.
This is intended to eventually replace multi_client_executor.c and
connection_cache.c, and to provide the basis of a centralized
transaction management.

The newly introduced transaction hook should, in the future, be the only
one in citus, to allow for proper ordering between operations.  For now
this central handler is responsible for releasing connections and
resetting XactModificationLevel after a transaction.
2016-10-07 17:46:20 -07:00
Andres Freund 61eb3e4c5e Add some basic helpers to make use of dynahash hashtables easier. 2016-10-07 17:46:20 -07:00
Jason Petersen 76d86e1ac9 Merge pull request #860 from citusdata/fix_and_run_all_tests
Fix tests and tell Travis to run them all

cr: @marcocitus
2016-10-07 17:38:19 -06:00
Jason Petersen bcfc58a7c7
Fix tests and tell Travis to run them all
Two sets of tests are fixed by this change:
  * multi_agg_approximate_distinct
  * those in multi_task_tracker_extra_schedule

The first broke when we renamed stage to load in many files and was
never being run because the HyperLogLog extension wasn't easily
available in Debian. Now it's in our repo, so we install it and run
the test. I removed the distinct HLL target in favor of just always
running it and providing an output variant to handle when the extension
is absent. Basically, if PostgreSQL thinks HLL is available, the test
installs it and runs normally, otherwise the absent variant is used.

The second broke when I removed a test variant, erroneously believing
it to be related to an older Citus version. I've added a line in that
test to clarify why the variant is necessary (a practice we should
widely adopt).
2016-10-07 17:32:54 -06:00
Andres Freund 85075b7c28 Merge pull request #857 from citusdata/feature/placementid
Introduce placement IDs.
2016-10-07 12:54:12 -07:00
Marco Slot 33b7723530 Use UpdateShardPlacementState where appropriate 2016-10-07 11:59:20 -07:00
Andres Freund 982ad66753 Introduce placement IDs.
So far placements were assigned an Oid, but that was just used to track
insertion order. It also did so incompletely, as it was not preserved
across changes of the shard state. The behaviour around oid wraparound
was also not entirely as intended.

The newly introduced, explicitly assigned, IDs are preserved across
shard-state changes.

The prime goal of this change is not to improve ordering of task
assignment policies, but to make it easier to reference shards.  The
newly introduced UpdateShardPlacementState() makes use of that, and so
will the in-progress connection and transaction management changes.
2016-10-07 11:59:20 -07:00
Metin Döşlü 7e8efbe540 Merge pull request #841 from citusdata/reduce_min_task_tracker_delay
Reduce minimum value of task_tracker_delay to 1ms
2016-10-07 10:10:59 +03:00
Metin Doslu d94a65e0e9 Reduce minimum value of task_tracker_delay to 1ms 2016-10-07 09:55:56 +03:00
Marco Slot 770d09b48e Merge pull request #854 from citusdata/marcocitus-patch-1
Update docs links to v5.2 docs
2016-10-05 16:40:15 -07:00
Marco Slot 2843fdf43d Update docs links to v5.2 docs 2016-10-06 01:27:30 +02:00
Eren Başak efde4d67f3 Merge pull request #798 from citusdata/786-add_pg_dist_node
Replace pg_worker_list.conf with a pg_dist_node table
2016-10-05 13:12:01 +03:00
Brian Cloutier 9d6699b07c Switch from pg_worker_list.conf file to pg_dist_node metadata table.
Related to #786

This change adds the `pg_dist_node` table that contains the information
about the workers in the cluster, replacing the previously used
`pg_worker_list.conf` file (or the one specified with `citus.worker_list_file`).

Upon update, `pg_worker_list.conf` file is read and `pg_dist_node` table is
populated with the file's content. After that, `pg_worker_list.conf` file
is renamed to `pg_worker_list.conf.obsolete`

For adding and removing nodes, the change also includes two new UDFs:
`master_add_node` and `master_remove_node`, which require superuser
permissions.

'citus.worker_list_file' guc is kept for update purposes but not used after the
update is finished.
2016-10-05 13:01:35 +03:00
Marco Slot 4fae2133f1 Merge pull request #816 from citusdata/mx/add_partition_column
Add replication model column to pg_dist_partition
2016-10-05 02:38:16 -07:00
Marco Slot 32b2bd4ed8 Add replication model column to pg_dist_partition 2016-10-05 01:14:28 +02:00
Önder Kalacı 40d99d9845 Merge pull request #838 from citusdata/update_function_name
Update ColocatedShardPlacementList() function name to
2016-10-04 11:31:47 +03:00
Onder Kalaci 0993f2fb2c Update ColocatedShardPlacementList() function name to
ColocatedShardIntervalList() which was intented.
2016-10-04 09:51:42 +03:00
Marco Slot 09e3d5fd47 Merge pull request #837 from citusdata/bugfix/pnstrdup
Avoid use of pnstrdup
2016-10-04 07:09:15 +02:00
Marco Slot fe3ffdb013 Avoid use of pnstrdup 2016-10-04 00:31:53 +02:00
Marco Slot 6c0fc0c970 Merge pull request #783 from robin900/new-extend-names
Provides safe, backwards-compatible shard-extended names to any object name
2016-10-03 23:17:44 +02:00
Robin Thomas f677fadbe6 Provides safe, idempotent shard-extended names to any object name
related to a table that might be distributed, allowing any name
that is within regular PostgreSQL length limits to be extended
with a shard ID for use in shards on workers. Handles multi-byte
character boundaries in identifiers when making prefixes for
shard-extended names. Includes tests.
Uses hash_any from PostgreSQL's access/hashfunc.c.
Removes AppendShardIdToStringInfo() as it's used only once
and arguably is best replaced there with a call to AppendShardIdToName().

Adds UDF shard_name(object_name, shard_id) to expose the shard-extended
name logic to other PL/PGSQL, UDFs and scripts.

Bumps version to 6.0-2 to allow for UDF to be created in migration script.

Fixes citusdata/citus#781 and citusdata/citus#179.
2016-10-03 17:02:34 -04:00