Commit Graph

1926 Commits (2c5d59f3a8ca147d4566d8bde42280ebf9c01d4e)

Author SHA1 Message Date
Brian Cloutier 097fd15a89 small refactor, CheckDeadlockForTransactionNode builds it's own array 2018-02-01 10:30:41 -08:00
Brian Cloutier 457f570b77 Small refactor, we were using incompatible types 2018-01-31 11:05:59 -08:00
Brian Cloutier b864d014ab
GetNextNodeId() incorrectly called PG_RETURN_DATUM
- Also stabilize the output of a multi_router_planner test
2018-01-29 15:32:36 -08:00
Brian Cloutier 61a6b846b9 Refactor: use a temporary timestamp variable
It's against our coding convention to call functions inside parameter
lists; when single-stepping with a debugger it's difficult to determine
what the function returned.

That wouldn't be good enough reason to change this code but while
porting Citus to Windows I ran into this line of code.
assign_distributed_transaction_id was called with a weird timestamp and
I wasn't able to find the problem without first making this change.
2018-01-29 11:20:13 -08:00
Marco Slot 0303dfc463
Merge pull request #1981 from citusdata/faster_execute_subplans
Skip call to ActiveReadableNodeList when there are no subplans
2018-01-29 17:20:44 +01:00
Marco Slot bd0ebac865 Skip call to ActiveReadableNodeList when there are no subplans 2018-01-29 16:05:10 +01:00
Hadi Moshayedi ff26bcd5a5
Include sys/stat.h for S_IRUSR and S_IWUSR. (#1977) 2018-01-26 16:21:48 -05:00
Marco Slot ddbcb9fc25
Merge pull request #1944 from citusdata/base_schedule
Add base schedule for only running specific regression tests
2018-01-25 22:12:34 +01:00
Marco Slot 4762503c34 Add base schedule for only running specific regression tests 2018-01-25 18:51:22 +01:00
Burak Velioglu d43e18f398
Merge pull request #1975 from citusdata/add_remaining_changelog
Adds missing item to 7.2 changelog
2018-01-25 17:18:01 +03:00
velioglu 414778d360 Adds missing item to 7.2 changelog 2018-01-25 16:58:09 +03:00
Brian Cloutier 76d1edc3fd
Don't rely on gcc-specific features (#1963)
* Don't use expressions inside compound statements
* Don't depend on __builtin_constant_p
* Remove reliance on S_ISLNK
* Replace use of __func__: older mcvs doesn't support this builtin
2018-01-23 17:03:29 -08:00
Önder Kalacı 59a03d809d
Merge pull request #1961 from citusdata/fix_wrong_deadlock
Prevent canceling backends that are active but not involved in the distributed deadlock
2018-01-22 10:09:53 +03:00
Onder Kalaci fbde87d2d0 Allocate enough space for transaction nodes
This fix prevents any potential memory access that might occur
while forming the deadlock path.
2018-01-22 08:45:48 +02:00
Onder Kalaci 9a89c0b425 Fix bug while traversing the distributed deadlock graph
With this fix, we traverse the graph with DFS which was originally
intended. Note that, before the fix, we traverse the graph with BFS
which might lead to killing some unrelated backend that is not
involved in the distributed deadlock.
2018-01-22 08:45:48 +02:00
Dimitri Fontaine bff44394fb
Merge pull request #1948 from citusdata/feature/alter-index
Add support for Alter Index Commands, and Storage Parameters on tables and indexes.
2018-01-18 11:27:33 +01:00
Dimitri Fontaine c9760fbb64 Fix CREATE INDEX with storage options on distributed tables.
By sharing the implementation of the function AppendOptionListToString on
three call sites, we would expand an extra OPTIONS keyword in a create index
statement, and omit other bits of the specific syntax here.

This patch introduces an AppendStorageParametersToString() function that is
very similar to AppendOptionListToString() but handles WITH(a="foo",...)
syntax that is used in reloptions (aka Storage Parameters).

Fixes #1747.
2018-01-17 21:56:40 +01:00
Dimitri Fontaine 952da72c55 Implement ALTER TABLE|INDEX ... SET|RESET ().
PostgreSQL implements support for several relation kinds in a single
statement, such as in the AlterTableStmt case, which supports both tables
and indexes and more (see ATExecSetRelOptions in PostgreSQL source code file
src/backend/commands/tablecmds.c for an example of that).

As a consequence, this patch implements support for setting and resetting
storage parameters on both relation kinds.
2018-01-17 21:56:40 +01:00
Dimitri Fontaine 17266e3301 Implement ALTER INDEX ... RENAME TO ...
The command is now distributed among the shards when the table is
distributed. To that effect, we fill in the DDLJob's targetRelationId with
the OID of the table for which the index is defined, rather than the OID of
the index itself.
2018-01-17 21:56:40 +01:00
Burak Velioglu aee0be881b
Merge pull request #1955 from citusdata/master-update-version-1516091373
Bump Citus to 7.3devel
2018-01-16 13:57:51 +03:00
velioglu d357d2fccd Bump citus version to 7.3devel 2018-01-16 11:50:28 +03:00
Burak Velioglu 3a82f4e6d2
Merge pull request #1954 from citusdata/citus-7.2.0-changelog-1516086689
Add changelog entry for 7.2.0
2018-01-16 11:23:14 +03:00
velioglu 1d53a71397 Add changelog entry for 7.2.0 2018-01-16 11:12:12 +03:00
Önder Kalacı 7d3cb721de
Merge pull request #1946 from citusdata/fix_missing_test_tx_id
Add test that checks whether distributed transaction ID survives pg_dist_partition invalidation
2018-01-11 17:37:15 +03:00
Marco Slot 6fb8cfc104 Add test that checks whether distributed transaction ID survives pg_dist_partition invalidation 2018-01-11 16:14:39 +02:00
Dimitri Fontaine 6dd1793da9
Merge pull request #1939 from citusdata/feature/rename-table
Add support for renaming Distributed Tables
2018-01-11 13:38:18 +01:00
Dimitri Fontaine 1f088791bd Add DDL tests with non-public schema.
Citus sometimes have regressions around non-default schema support, meaning
not public and not in the search_path, per @marcocitus. This patch changes
some regression tests to use a non-default schema in order to cover more
cases.
2018-01-11 13:21:24 +01:00
Dimitri Fontaine e010238280 Implement ALTER TABLE ... RENAME TO ...
The implementation was already mostly in place, but the code was protected
by a principled check against the operation. Turns out there's a nasty
concurrency bug though with long identifier names, much as in #1664.

To prevent deadlocks from happening, we could either review the DDL
transaction management in shards and placements, or we can simply reject
names with (NAMEDATALEN - 1) chars or more — that's because of the
PostgreSQL array types being created with a one-char prefix: '_'.
2018-01-11 13:21:24 +01:00
Burak Velioglu ef3517a5dc
Merge pull request #1943 from citusdata/release-6.2-changelog
Add changelog entry for 6.2.5
2018-01-11 12:31:53 +03:00
velioglu a7eccd5d9d Add changelog entry for 6.2.5 2018-01-11 11:28:02 +03:00
Burak Velioglu e328ff973f
Merge pull request #1929 from citusdata/citus-7.1.2-changelog
Bump citus to 7.1.2
2018-01-04 14:23:22 +03:00
velioglu 70fade547b Add changelog entry for 7.1.2 2018-01-04 13:39:27 +03:00
Hadi Moshayedi 5d7c52ffa6
Don't return in PG_TRY() block when cancellations happen in WaitForConnections(). (#1923)
We shouldn't return in middle of a PG_TRY() block because if we do, we won't reset PG_exception_stack, and later when a re-throw tries to jump to the jump-point which was active in this PG_TRY() block, it seg-faults.

We used to return in middle of PG_TRY() block in WaitForConnections() where we checked for cancellations. Whenever cancellations were caught here, Citus crashed. And example was reported by @onderkalaci at #1903.
2018-01-03 09:54:03 -05:00
Marco Slot 8f69973411 Fix cancellation issues in the real-time executor (#1905) 2018-01-01 23:10:29 -05:00
Marco Slot 3fd65cb91b Do not raise errors in the real-time executor (#1903) 2018-01-01 22:26:31 -05:00
Önder Kalacı 6e34a8fbf4
Merge pull request #1918 from citusdata/fix_outer_join_pushdown
Outer joins should also use/try subquery pushdown planner if join clause is not supported
2017-12-29 17:56:13 +03:00
Onder Kalaci a1bbdf2d44 Outer joins should also use subquery pushdown planner if join
clause is not supported

This change allows unsupported clauses to go through query pushdown
planner instead of erroring out as we already do for non-outer joins.
2017-12-29 16:40:47 +02:00
Önder Kalacı 4e9d4c1bd3
Merge pull request #1894 from citusdata/unions
Support set operations
2017-12-26 15:19:23 +03:00
Marco Slot 09c09f650f Recursively plan set operations when leaf nodes recur 2017-12-26 13:46:55 +02:00
Önder Kalacı 4650418f58
Merge pull request #1907 from citusdata/add_some_tests
Add some regression tests for recursively planned subqueries
2017-12-25 16:17:36 +03:00
Onder Kalaci eb929e9001 Add some more basic regression tests, mostly for documentation purposes 2017-12-25 15:03:45 +02:00
Mehmet Furkan ŞAHİN e92aca6fe7
Merge pull request #1901 from citusdata/errors_fix
Error messages are updated after recursive planner
2017-12-25 15:27:25 +03:00
mehmet furkan şahin 446893234a unsupported subquery error messages are fixed 2017-12-25 15:10:59 +03:00
Mehmet Furkan ŞAHİN dcafd1368b
Merge pull request #1897 from citusdata/subquery_debug_output
new debug output for subplans
2017-12-25 10:19:04 +03:00
mehmet furkan şahin 57bc86e23d new debug output for subplans 2017-12-25 09:50:51 +03:00
Marco Slot a2e2419ad1
Merge pull request #1878 from citusdata/log_remote_command
Log remote commands sent via MultiClientSendQuery
2017-12-22 17:30:18 +01:00
Marco Slot fa7fa2734b Log remote commands sent via MultiClientSendQuery 2017-12-22 16:18:40 +01:00
Murat Tuncer 87c6f306f1
Fix join clause eq restrictions (#1884)
We used to error out if the join clause includes filters like
t1.a < t2.a even if other filter like t1.key = t2.key exists.

Recently we lifted that restriction in subquery planning by
not lifting that restriction and focusing on equivalance classes
provided by postgres.

This checkin forwards previously erroring out real-time queries
due to join clauses to subquery planner and let it handle the
join even if the query does not have a subquery.

We are now pushing down queries that do not have any
subqueries in it. Error message looked misleading, changed to a more descriptive one.
2017-12-22 12:16:14 +03:00
Metin Döşlü 3aee73674b
Merge pull request #1895 from citusdata/no_shard_locks_for_ddls
Get shard resource locks for only DMLs
2017-12-22 10:57:20 +03:00
metdos 32b7e152a3 Get shard resource locks for only DMLs 2017-12-22 10:30:41 +02:00