Commit Graph

492 Commits (a72eed5aedfddc312869693992bbabfbd2d7f00b)

Author SHA1 Message Date
Marco Slot a72eed5aed Move requiresMasterEvaluation from Task to Job 2016-10-19 08:23:06 +02:00
Marco Slot d02050754b Refactor and redocument executor shard lock code 2016-10-19 08:13:35 +02:00
Jason Petersen a30e205939 Merge pull request #850 from citusdata/add_9.6_support
Support PostgreSQL 9.6

cr: @anarazel
2016-10-18 16:30:30 -06:00
Andres Freund 0e02b838a3 Support PostgreSQL 9.6
Adds support for PostgreSQL 9.6 by copying in the requisite ruleutils
file and refactoring the out/readfuncs code to flexibly support the
old-style copy/pasted out/readfuncs (prior to 9.6) or use extensible
node APIs (in 9.6 and higher).

Most version-specific code within this change is only needed to set new
fields in the AggRef nodes we build for aggregations. Version-specific
test output files were added in certain cases, though in most they were
not necessary. Each such file begins by e.g. printing the major version
in order to clarify its purpose.

The comment atop citus_nodes.h details how to add support for new nodes
for when that becomes necessary.
2016-10-18 16:23:55 -06:00
Murat Tuncer 5c61b296cf Merge pull request #843 from citusdata/custom_udf_run_all
Add Citus tools UDFs
2016-10-18 21:26:56 +03:00
Murat Tuncer f76cb6672a Add master_run_on_worker UDF 2016-10-18 17:59:54 +03:00
Eren Başak 47119ef880 Merge pull request #864 from citusdata/migrate_worker_transactions
Add worker transaction and transaction recovery infrastructure
2016-10-18 14:25:12 +03:00
Eren Basak e31830f3fb Add worker transaction and transaction recovery infrastructure 2016-10-18 14:18:14 +03:00
Metin Döşlü 69a56cff2a Merge pull request #820 from citusdata/parameterized_queries_regression_tests
Add regression tests for parameterized queries
2016-10-18 14:08:59 +03:00
Metin Doslu ca4a94e137 Add regression tests for parameterized queries 2016-10-18 14:02:50 +03:00
Eren Başak 8e419fa748 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 cb1d9cba5e Add hasmetadata column to pg_dist_node 2016-10-17 11:52:18 +03:00
Eren Basak c3107b1315 Add metadata infrastructure for pg_dist_local_group table 2016-10-17 11:52:18 +03:00
Eren Basak 1e95e4576d 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 5df7674923 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 662b767431 Fix changing placement ids in metadata snapshot test 2016-10-14 11:13:16 +03:00
Brian Cloutier 1203f32b6a Merge pull request #868 from citusdata/746-drop-shardalias
Drop shardalias
2016-10-14 11:10:54 +03:00
Brian Cloutier 84c4ba1073 Drop shardalias 2016-10-14 11:03:26 +03:00
Önder Kalacı f3ee588e00 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 55341815a8 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ü 1f76690efa Merge pull request #811 from citusdata/having_support
Add HAVING support
2016-10-13 16:05:18 +03:00
Metin Doslu 827d1ddb75 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 4ffc29d32a Merge pull request #799 from citusdata/metadata_sync
Add Metadata Snapshot Infrastructure
2016-10-13 10:47:48 +03:00
Eren Basak 6cb3ae93ba 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 5d05a3a97e 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 9330719b89 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
Jason Petersen 24afe948b1 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 60ec3345a7 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 b3d1051f50 Merge pull request #857 from citusdata/feature/placementid
Introduce placement IDs.
2016-10-07 12:54:12 -07:00
Marco Slot cc8a30d033 Use UpdateShardPlacementState where appropriate 2016-10-07 11:59:20 -07:00
Andres Freund 5de52c3b04 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ü 8206cf6145 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 e202746dea Reduce minimum value of task_tracker_delay to 1ms 2016-10-07 09:55:56 +03:00
Marco Slot 82607ee8dd 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 406330136c Update docs links to v5.2 docs 2016-10-06 01:27:30 +02:00
Eren Başak 9fd03fe632 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 62e7bdbdd6 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 5f81a84cfe 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 31ab616b31 Add replication model column to pg_dist_partition 2016-10-05 01:14:28 +02:00
Önder Kalacı e678c57648 Merge pull request #838 from citusdata/update_function_name
Update ColocatedShardPlacementList() function name to
2016-10-04 11:31:47 +03:00
Onder Kalaci 06217bade0 Update ColocatedShardPlacementList() function name to
ColocatedShardIntervalList() which was intented.
2016-10-04 09:51:42 +03:00
Marco Slot e1f86bb9ae Merge pull request #837 from citusdata/bugfix/pnstrdup
Avoid use of pnstrdup
2016-10-04 07:09:15 +02:00
Marco Slot b79c8657d6 Avoid use of pnstrdup 2016-10-04 00:31:53 +02:00
Marco Slot 01cec61288 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 d23f11490a 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
Andres Freund 1c1c502318 Merge pull request #834 from citusdata/valgrind-clean
Fix issues making valgrind fail
2016-10-03 14:01:27 -07:00
Andres Freund 3f8fb191cc Don't create hash-table of zero size in TaskHashCreate().
hash_create(), called by TaskHashCreate(), doesn't work correctly for a
zero sized hash table. This triggers valgrind errors, and could
potentially cause crashes even without valgring.

This currently happens for Jobs with 0 tasks. These probably should be
optimized away before reaching TaskHashCreate(), but that's a bigger
change.
2016-10-03 13:07:43 -07:00
Andres Freund 9ebc46d15c Initialize count_agg_clauses argument to 0.
count_agg_clause *adds* the cost of the aggregates to the state
variable, it doesn't reinitialize it. That is intentional, as it is used
to incrementally add costs in some places.
2016-10-03 13:07:43 -07:00
Andres Freund 6de3a92e79 Lower "waiting for activity on tasks took longer than" log level.
It's perfectly normal to wait longer in several circumstances, and the
output can lead to spurious regression output changes.
2016-10-03 13:07:43 -07:00
Marco Slot bd589b4555 Merge pull request #831 from citusdata/ultimate_citus_improvement
Change logicalrelid type to regclass
2016-10-03 20:34:57 +02:00