Commit Graph

1417 Commits (4a17d12d74263d6d8e4042c6d9dba56d48e15a1a)

Author SHA1 Message Date
Brian Cloutier 4a17d12d74 Replace uint with uint32 2017-10-25 19:32:12 -07:00
Burak Velioglu fade7c1667 Merge pull request #1690 from citusdata/update_delete_multiple_shard
Support multi shard update/delete queries
2017-10-25 16:06:12 +03:00
velioglu 0b5db5d826 Support multi shard update/delete queries 2017-10-25 15:52:38 +03:00
Marco Slot 8dd85f5c5a Merge pull request #1724 from citusdata/relay_dml_error
Relay error message if DML fails on worker
2017-10-25 14:38:18 +02:00
Marco Slot 4bde83e1d2 Relay error message if DML fails on worker 2017-10-25 14:23:21 +02:00
Hadi Moshayedi 9a04b78980 Send server_id for statistics reports. (#1698)
This change introduces the `pg_dist_node_metadata` which has a single jsonb value. When creating
the extension, a random server id is generated and stored in there. Everything in the metadata table
is added as a nested objected to the json payload that is sent to the reports server.
2017-10-18 21:20:32 -04:00
Hadi Moshayedi 86bcd93a4a Don't collect stats when there is a version mismatch. (#1712)
The following scenario can cause an Assert() crash if we don't do this:
- Install Citus v7.0-15
- Restart server & run a query to start maintenanced.
- Install Citus v7.1
- Restart server & run a query. This will tell user to upgrade.
- Type "UPDATE EXTENSION c" & press tab. maintenanced will start and crash
  with Assert(CitusHasBeenLoaded() && CheckCitusVersion(WARNING));

This change checks Citus version before calling metadata functions so the
crash doesn't happen.
2017-10-17 14:01:14 -04:00
Jason Petersen e4072a3dbb Merge pull request #1700 from citusdata/improve_build_metadata
Improve build metadata generated by configure

cr: @pykello
2017-10-16 18:29:05 -06:00
Jason Petersen f2c593b25c
Add CITUS_NAME and CITUS_EDITION
Unambiguous places to check whether we're running simply Citus or Citus
Enterprise, or to check for 'community' or 'enterprise'.
2017-10-16 18:09:29 -06:00
Jason Petersen 8544878c4b
Add citus_version(), analogous to PG's version()
This will provide the full project name (i.e. Citus/Citus Enterprise),
and the host system, compiler, and architecture word size.

I wanted to limit the number of copied files in 'config', so I added
only config.guess and call it manually, rather than using the macro
AC_CANONICAL_HOST, which requires several other files.
2017-10-16 18:09:29 -06:00
Jason Petersen 339d0d6dc7
Add with-extra-version support to configure
PostgreSQL has it, now we do too!

Example: `./configure --with-extra-version=+git.20171011.a1387f4` would
currently result in: `` reporting the more useful:

	SHOW citus.version;

	         citus.version
	-------------------------------
	 7.1devel+git.20171011.a1387f4

Nice to have for packaging, one-off customer builds, etc. This stuff
is generally already in the package metadata, but it will be nice to
have it directly within a psql session.
2017-10-16 18:09:29 -06:00
Brian Cloutier 91ff8cd2d5 {*,}create_distributed_table doesn't emit OID (#1710) 2017-10-16 18:08:51 -06:00
Brian Cloutier ebcb2b65e9 Add master_move_node function 2017-10-16 10:51:28 -07:00
Burak Yücesoy 4a155bfccf Merge pull request #1707 from citusdata/add_changelog_entry_for_703
Add CHANGELOG entry for 7.0.3
2017-10-16 00:49:18 -08:00
Burak Yucesoy 0cf63039b4 Add CHANGELOG entry for 7.0.3 2017-10-16 11:40:51 +03:00
Brian Cloutier 58cf15ceca DistributedTableSize doesn't emit oid when erring out 2017-10-14 02:42:57 +03:00
Hadi Moshayedi 2aec6eda49 Properly use #ifdef HAVE_LIBCURL. 2017-10-13 12:04:36 -06:00
Jason Petersen 01353cb7cb Use header define rather than -D flag
Eclipse apparently doesn't scan build output looking for -D flags, so
having the value actually appear in a header is nicer for those of us
using IDEs.
2017-10-13 11:00:09 -04:00
Hadi Moshayedi 946659aebe Delete StatsCollection memory context after we are done with stats reporting.
Previously we left the memory context untouched, which overtime leaked memory.
2017-10-13 11:00:09 -04:00
Hadi Moshayedi 873fd1e7ff Fix compiling --without-libcurl.
Previously <curl/curl.h> was included even if compiled --without-libcurl.
This can fail when libcurl headers are not there. This commit guards this
include by checks for HAVE_LIBCURL.
2017-10-13 11:00:09 -04:00
Murat Tuncer 4832abc7cb Make multi_master_planner.c coding convention compliant
Changed order of function definitions and added
declarations in the beginning of the file
2017-10-13 14:59:48 +03:00
Murat Tuncer f7ab901766 Add select distinct, and distinct on support
Distinct, and distinct on() clauses are supported
in simple selects, joins, subqueries, and insert into select
queries.
2017-10-13 14:59:48 +03:00
Hadi Moshayedi 6879f92e23 Fix out of bound memeory access when getting HTTP response code. (#1699) 2017-10-12 12:51:42 -04:00
Hadi Moshayedi a1387f4aa8 Basic usage statistics collection. (#1656)
Adds ```citus.enable_statistics_collection``` GUC variable, which ```true``` by default, unless built without libcurl. If statistics collection is enabled, sends basic usage data to Citus servers every 24 hours.

The data that is collected consists of:
- Citus version
- OS name & release
- Hardware Id
- Number of tables, rounded to next power of 2
- Size of data, rounded to next power of 2
- Number of workers
2017-10-11 09:55:15 -04:00
Mehmet Furkan ŞAHİN e202c51fec Merge pull request #1668 from citusdata/window_function_preliminary_implementation
Add window function support for SUBQUERY PUSHDOWN and INSERT INTO SELECT
2017-10-04 17:18:26 +03:00
Onder Kalaci 498ac80d8b Add window function support for SUBQUERY PUSHDOWN and INSERT INTO SELECT
This commit provides the support for window functions in subquery and insert
into select queries. Note that our support for window functions is still limited
because it must have a partition by clause on the distribution key. This commit
makes changes in the files insert_select_planner and multi_logical_planner. The
required tests are also added with files multi_subquery_window_functions.out
and multi_insert_select_window.out.
2017-10-04 15:33:07 +03:00
Marco Slot f6b43d81ec Merge pull request #1684 from citusdata/remove_binary_copy_tests
Remove separate citus.binary_worker_copy_format regression tests
2017-10-04 13:33:56 +02:00
Marco Slot 24915779d1 Remove separate citus.binary_worker_copy_format regression tests 2017-10-03 17:44:50 +02:00
Marco Slot f58c695d0f Merge pull request #1682 from citusdata/fix_2pc_id
Use local group ID when querying for prepared transactions
2017-10-03 17:44:34 +02:00
Marco Slot 9e516513fc Use local group ID when querying for prepared transactions 2017-10-03 16:36:53 +02:00
Hadi Moshayedi 11adb9b034 Push down LIMIT and HAVING when grouped by partition key. (#1641)
We can do this because all rows belonging to a group are in the same shard when grouping by distribution column on a range/hash distributed table.
2017-10-02 20:17:51 -04:00
Marco Slot 03bddcbfab Merge pull request #1681 from citusdata/fix_metadata_cache
Invalidate worker and group ID cache in maintenance daemon
2017-10-02 18:29:30 +02:00
Marco Slot 394918f9d0 Invalidate worker and group ID cache in maintenance daemon 2017-10-02 18:14:29 +02:00
Burak Yücesoy 020c21df64 Merge pull request #1678 from citusdata/add_changelog_entry_for_702
Add CHANGELOG entry for 7.0.2
2017-09-28 10:27:36 -07:00
Burak Yucesoy 29a4f88b55 Add CHANGELOG entry for 7.0.2 2017-09-28 10:26:28 -07:00
Burak Yücesoy 45a1b9e590 Merge pull request #1677 from citusdata/add_changelog_entry_for_624
Add CHANGELOG entry for 6.2.4
2017-09-28 10:25:37 -07:00
Burak Yucesoy 05678c3a3b Add CHANGELOG entry for 6.2.4 2017-09-28 10:24:48 -07:00
Burak Yücesoy 76d05050bd Merge pull request #1676 from citusdata/add_changelog_entry_for_613
Add CHANGELOG entry for 6.1.3
2017-09-28 10:16:03 -07:00
Burak Yucesoy ba31e35791 Add CHANGELOG entry for 6.1.3 2017-09-28 10:07:31 -07:00
Marco Slot 632d0c675a Merge pull request #1672 from citusdata/task_tracker_superuser
Execute transmit commands as extension owner during task-tracker queries
2017-09-28 06:43:26 -07:00
Marco Slot bb50fc9cb5 Add multi-user re-partitioning regression tests 2017-09-28 15:27:26 +02:00
Marco Slot 43d5e79eaa Execute transmit commands as superuser during task-tracker queries 2017-09-28 15:27:25 +02:00
Marco Slot 306c58d59b Check for absolute paths in COPY with format transmit 2017-09-28 15:27:11 +02:00
Marco Slot cb6b0e820c Allow read-only users to run task-tracker queries 2017-09-28 13:52:36 +02:00
Marco Slot 8483d6213b Merge pull request #1667 from citusdata/recovery_index_fix
Use unique constraint index for transaction record deletion
2017-09-28 03:20:18 -07:00
Marco Slot da6b42a3e2 Use unique constraint index for transaction record deletion 2017-09-28 12:04:56 +02:00
Önder Kalacı b2d42a0595 Merge pull request #1670 from citusdata/remove_unnecessary_locks_in_graph
Skip relation extension locks on distributed deadlock detection
2017-09-28 10:30:49 +03:00
Onder Kalaci 68ca8cb7f0 Skip relation extension locks
We should skip if the process blocked on the relation
extension since those locks are hold for a short duration
while the relation is actually extended on the disk and
released as soon as the extension is done. Thus, recording
such waits on our lock graphs could yield detecting wrong
distributed deadlocks.
2017-09-28 10:09:09 +03:00
Murat Tuncer 4676c4f7a5 Prevent crash when remote transaction start fails (#1662)
We sent multiple commands to worker when starting a transaction.
Previously we only checked the result of the first command that
is transaction 'BEGIN' which always succeeds. Any failure on
following commands were not checked.

With this commit, we make sure all command results are checked.
If there is any error we report the first error found.
2017-09-26 17:25:46 -07:00
Jason Petersen a8428dff01 Merge pull request #1633 from citusdata/fix_pg_11
Get PostgreSQL 11 build passing

cr: @pykello
2017-09-26 11:44:17 -07:00