Commit Graph

1394 Commits (a1387f4aa814afcc8d26cfec36d2006a486d18fa)

Author SHA1 Message Date
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
Jason Petersen b4d53423fa
Add adapter functions for OpenFile changes 2017-09-25 17:20:24 -07:00
Jason Petersen d686123dae
Omit now-public Explain methods from PG11 build
This copy-pasted code is no longer needed in PG11.
2017-09-25 17:20:24 -07:00
Jason Petersen 89d02c6115
Add ruleutils file for PostgreSQL 11 2017-09-25 17:20:24 -07:00
Jason Petersen bbc15e0598
Handle HASHPROC changes
PostgreSQL 11 now has "standard" and "extended" (64-bit) versions of
hash functions.
2017-09-25 17:20:24 -07:00
Jason Petersen b4474fc0b0
Modify version-output tests for PostgreSQL 11
Basically we just care whether the running version is before or after
PostgreSQL 10, so testing the major version against 9 and printing a
boolean is sufficient.
2017-09-25 17:20:24 -07:00
Jason Petersen 6c9b19a954
Add version-compat header
For polyfill macros, etc.
2017-09-25 17:20:23 -07:00
Jason Petersen fbeaa2f9d0
Remove direct access to tupleDesc->attrs
A level of indirection was removed from this field for PostgreSQL 11.
By using the handy provided macro, we can be version agnostic.
2017-09-25 17:20:23 -07:00
Jason Petersen 6a020b5adc
Update CopyGetAttnums with latest from PostgreSQL
This function was recently modified to use the TupleDescAttr wrapper,
which abstracts away recent changes to TupleDesc.
2017-09-25 17:20:23 -07:00
Marco Slot 91d9b41822 Merge pull request #1591 from citusdata/fix-shard-cache-inval
Fix possible shard cache incoherency.
2017-09-25 17:01:03 -07:00
Andres Freund 78716e5546 Fix possible shard cache incoherency.
When a table and it's shards are dropped, and afterwards the same
shard identifiers are reused, e.g. due to a DROP & CREATE EXTENSION,
the old entry in the shard cache and the required entry in the shard
cache might be for different tables.

Force invalidation for both old and new table to fix.
2017-09-25 13:05:09 -07:00
Jason Petersen 41350fdd54
Remove obsolete lines 2017-09-25 11:18:25 -07:00
Burak Velioglu 24dc95ee98 Merge pull request #1580 from citusdata/change_error_message_of_local_dist
Add error detail if query contains both local and distributed tables
2017-09-25 10:05:37 -07:00
velioglu 0a56ed910b Change error message of queries with distributed and local table
Citus can handle INSERT INTO ... SELECT queries if the query inserts
into local table by reading data from distributed table. The opposite
way is not correct. With this commit we warn the user if the latter
option is used.
2017-09-22 13:46:19 -07:00
Önder Kalacı fb70400b61 Merge pull request #1661 from citusdata/fix_crash
Trim trailing characters & copy the message returned by `PQerrorMessage()`
2017-09-22 23:10:56 +03:00
Onder Kalaci 867224bdd7 Make the tests produce more consistent outputs 2017-09-22 20:38:56 +03:00
Onder Kalaci 4782f9f98a Properly copy and trim the error messages that come from pg_conn
When a NULL connection is provided to PQerrorMessage(), the
returned error message is a static text. Modifying that static
text, which doesn't necessarly be in a writeable memory, is
dangreous and might cause a segfault.
2017-09-22 19:43:09 +03:00
Onder Kalaci 6736fd1682 Remove two obsolete functions
Namely GetConnectionFromPGconn() and CloseConnectionByPGconn()
2017-09-21 00:36:23 -06:00
Önder Kalacı 9901017f3f Merge pull request #1652 from citusdata/fix_create_schema
Ensure schema exists on reference table creation
2017-09-19 00:12:21 +03:00
Onder Kalaci 33ec33c5b3 Ensure schema exists on reference table creation
If the schema doesn't exists on the workers, create it.
2017-09-18 23:50:47 +03:00
Önder Kalacı c6ec49312c Merge pull request #1653 from citusdata/fix_group_by
Allow pushing down GROUP BYs when at least there is one distribution
2017-09-15 19:38:15 +03:00
Onder Kalaci 6116c8e93d Allow pushing down GROUP BYs when at least there is one distribution
column in the target list
2017-09-15 19:15:06 +03:00
Önder Kalacı 6c9dffccbf Merge pull request #1628 from citusdata/expand_subquery_reference_table
Expand subquery pushdown for reference tables
2017-09-15 00:04:11 +03:00
Onder Kalaci a5b66912d4 Expand reference table support in subquery pushdown
With this commit, we relax the restrictions put on the reference
tables with subquery pushdown.

We did three notable improvements:

1) Relax equi-join restrictions

 Previously, we always expected that the non-reference tables are
 equi joined with reference tables on the partition key of the
 non-reference table.

 With this commit, we allow any column of non-reference tables
 joined using non-equi joins as well.

2) Relax OUTER JOIN restrictions

 Previously Citus errored out if any reference table exists at
 any point of the outer part of an outer join. For instance,
 See the below sketch where (h) denotes a hash distributed relation,
 (r) denotes a reference table, (L) denotes LEFT JOIN and
 (I) denotes INNER JOIN.

             (L)
             /  \
           (I)     h
          /  \
        r      h

 Before this commit Citus would error out since a reference table
 appears on the left most part of an left join. However, that was
 too restrictive so that we only error out if the reference table
 is directly below and in the outer part of an outer join.

3) Bug fixes

 We've done some minor bugfixes in the existing implementation.
2017-09-14 20:59:22 +03:00