Commit Graph

1806 Commits (121ff39b26a8961ac52ebf8ecca2d88a6fc797d6)

Author SHA1 Message Date
Markus Sintonen 6202e80d06 Implemented jsonb_agg, json_agg, jsonb_object_agg, json_object_agg 2018-02-18 00:19:18 +02:00
Önder Kalacı 62237c40a7
Merge pull request #2007 from citusdata/ref_where_sublinks_v2
Recursively plan subqueries in WHERE clause when FROM recurs
2018-02-14 10:32:20 +03:00
velioglu 195ac948d2 Recursively plan subqueries in WHERE clause when FROM recurs 2018-02-13 19:52:12 +03:00
Marco Slot 6ce4795f1c
Merge pull request #1996 from citusdata/cache_worker_node_array
Cache worker node array for faster iteration
2018-02-12 15:26:48 -08:00
Marco Slot 0cba4ab588 Refactor worker node hash initialisation 2018-02-12 23:36:43 +01:00
Marco Slot 40d715d494 Cache worker node array for faster iteration 2018-02-12 23:36:43 +01:00
Marco Slot 65fca44f4f
Merge pull request #1979 from citusdata/fix_abort_errors
Handle errors that are discovered during abort
2018-02-12 10:04:00 -08:00
Marco Slot d9c5c4a8f1
Merge pull request #2003 from citusdata/no_plan_copy
Only copy distributed plan when modifying it
2018-02-12 09:34:30 -08:00
Önder Kalacı bf1e492011
Merge pull request #1989 from citusdata/refactor_restriction_logic
Some code refactoring and performance improvements for restriction equivalences
2018-02-12 20:01:35 +03:00
Onder Kalaci 94c5ac6ebb Remove duplicate join restrictions
We use PostgreSQL hooks to accumulate the join restrictions
and PostgreSQL gives us all the join paths it tries while
deciding on the join order. Thus, for queries that have many
joins, this function is likely to remove lots of duplicate join
restrictions. This becomes relevant for Citus on query pushdown
check peformance.
2018-02-12 18:35:05 +02:00
Onder Kalaci c228d8ff3d Refactor equivalance generation related codes
This commit changes the APIs for restriction generation to make future
changes simpler.
2018-02-12 18:35:04 +02:00
Onder Kalaci 2f2d350924 Refactor relation restriction related codes
This commit moves some of the functions to a more relevant
source file.
2018-02-12 18:35:04 +02:00
Marco Slot 6e79a34c97 Do not check for cancellation in ClearResultsIfReady 2018-02-12 16:45:02 +01:00
Marco Slot 6051aae56e Handle errors that are discovered during abort 2018-02-12 16:45:02 +01:00
Marco Slot ee6a751798 Only copy distributed plan when modifying it 2018-02-12 16:30:55 +01:00
Jason Petersen e75eb17130
Try new Debian URL 2018-02-07 15:06:37 -07:00
Metin Döşlü 7332244c8c
Merge pull request #1999 from citusdata/citus-7.2.1-changelog-1517919981
Bump citus to 7.2.1
2018-02-06 15:41:44 +03:00
Metin Doslu 238defaee0 Add changelog entry for 7.2.1 2018-02-06 14:27:00 +02:00
Burak Yücesoy cf5d258043
Merge pull request #1993 from citusdata/subquery_pushdown_count_distinct
Fix count distinct using field select on top level query
2018-02-06 15:06:54 +03:00
Murat Tuncer 678223224b Update regression test output expectation based on recent PG10 change 2018-02-06 14:44:55 +03:00
Murat Tuncer 901b543e20 Fix count distinct using field select on top level query
We were allowing count distict queries even if they were
not directly on columns if the query is grouped on
distribution column.

When performing these checks we were skipping subqueries
because they also perform this check in a more concise manner.
We relied on oid SUBQUERY_RELATION_ID (10000) to decide if
a given RTE relation id denotes a subquery, however, we also
use SUBQUERY_PUSHDOWN_RELATION_ID (10001) for some subqueries.

We skip both type of subqueries with this change.
2018-02-06 13:16:10 +03:00
Metin Döşlü aba2f47cdf
Merge pull request #1988 from citusdata/respect_enable_hashagg
Respect enable_hashagg in the master planner
2018-02-05 16:27:05 +03:00
metdos 35f864bcaf Respect enable_hashagg in the master planner 2018-02-05 15:06:00 +02:00
metdos 3d540d961c Fix typo in grouping_is_sortable() 2018-02-05 12:10:19 +02:00
Marco Slot 00f9082cd4
Merge pull request #1965 from citusdata/fast_jsonb_copy
Skip JSON validation on coordinator during COPY
2018-02-04 14:56:56 +01:00
Marco Slot 6f7c3bd73b Skip JSON validation on coordinator during COPY 2018-02-02 15:33:27 +01:00
Brian Cloutier 15511f6ba1 Dynamically allocate connection metadata in WaitForAllConnections 2018-02-01 10:30:41 -08:00
Brian Cloutier e6ebfc1f53 Remove VLA from UpdateNodeLocation 2018-02-01 10:30:41 -08:00
Brian Cloutier a2ed45e206 Remove variable length arrays
VLAs aren't supported by Visual Studio.

- Remove all existing instances of VLAs.
- Add a flag, -Werror=vla, which makes gcc refuse to compile if we add
  VLAs in the future.
2018-02-01 10:30:41 -08:00
Brian Cloutier 2efe80ce55 CheckForDistributedDeadlocks no longer uses a VLA
- variable length arrays (VLAs) do not work with Visual Studio
- fix an off-by-one error. We incorrectly assumed there would always at
  least as many edges as there were nodes.
- refactor: reduce scope of transactionNodeStack by moving it into the
  function which uses it.
- refactor: break up the distinct uses of currentStackDepth into
  separate variables.
2018-02-01 10:30:41 -08:00
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