Commit Graph

2257 Commits (22bf55b34a2b0ba9fdf66af6694f70bb64fb7e4c)

Author SHA1 Message Date
velioglu 22bf55b34a
Bump Citus version to 8.1.2 2019-04-03 23:21:55 +03:00
velioglu 669af6f55c
Add changelog entry for 8.1.2 2019-04-03 23:17:34 +03:00
Marco Slot 14e9c6f249
Allow rescan in DECLARE .. WITH HOLD
(cherry picked from commit e3b7e74f43)
2019-04-03 17:42:47 +03:00
Onder Kalaci dfe68a28aa Ensure that stack resizing logic works expected
This commit has two goals:

(a) Ensure to access both edges of the allocated stack
(b) Ensure that any compiler optimizations to prevent the
    function optimized away.

Stack size after the patch:
 sudo grep -A 1 stack /proc/2119/smaps
7ffe305a6000-7ffe307a9000 rw-p 00000000 00:00 0                          [stack]
Size:               2060 kB

Stack size before the patch:
 sudo grep -A 1 stack /proc/3610/smaps
7fff09957000-7fff09978000 rw-p 00000000 00:00 0                          [stack]
Size:                132 kB

(cherry picked from commit fb38dc3136)
2019-04-03 13:25:13 +03:00
Hadi Moshayedi 17402cea52 Skip execution of ALTER TABLE constraint checks on the coordinator
(cherry picked from commit a9e6d06a98)
2019-04-03 11:31:32 +03:00
Hadi Moshayedi e09f45d8a9 Fix distributed deadlock for ALTER TABLE ... ATTACH PARTITION.
Following scenario resulted in distributed deadlock before this commit:

CREATE TABLE partitioning_test(id int, time date) PARTITION BY RANGE (time);
CREATE TABLE partitioning_test_2009 (LIKE partitioning_test);
CREATE TABLE partitioning_test_reference(id int PRIMARY KEY, subid int);

SELECT create_distributed_table('partitioning_test_2009', 'id'),
       create_distributed_table('partitioning_test', 'id'),
       create_reference_table('partitioning_test_reference');

ALTER TABLE partitioning_test ADD CONSTRAINT partitioning_reference_fkey FOREIGN KEY (id) REFERENCES partitioning_test_reference(id) ON DELETE CASCADE;
ALTER TABLE partitioning_test_2009 ADD CONSTRAINT partitioning_reference_fkey_2009 FOREIGN KEY (id) REFERENCES partitioning_test_reference(id) ON DELETE CASCADE;

ALTER TABLE partitioning_test ATTACH PARTITION partitioning_test_2009 FOR VALUES FROM ('2009-01-01') TO ('2010-01-01');

(cherry picked from commit cdd3b15ac8)
2019-04-03 11:30:16 +03:00
Murat Tuncer 3fa08f6622 Set sequential mode execution GUC for alter partitioned table
PG recently started propagating foreign key constraints
to partition tables. This came with a select query
to validate the the constaint.

We are already setting sequential mode execution for this
command. In order for validation select query to respect
this setting we need to explicitly set the GUC.

This commit also handles detach partition part.

(cherry picked from commit cd5213abee)
2019-04-03 11:28:57 +03:00
Hanefi Onaldi 4d5225eb30
Bump version to 8.1.1 2019-01-07 18:59:16 +03:00
Hanefi Onaldi 011ecb8773
Add changelog entry for 8.1.1 2019-01-07 18:46:18 +03:00
Murat Tuncer 741de0fb3c
Move repeated code to a function 2019-01-07 11:55:39 +03:00
Murat Tuncer c418392a88
Fix multi_view tests 2019-01-07 11:55:39 +03:00
Murat Tuncer 2a77fd7b5e
Fix having clause bug for complex joins
We update column attributes of various clauses for a query
inluding target columns, select clauses when we introduce
new range table entries in the query.

It seems having clause column attributes were not updated.

This fix resolves the issue
2019-01-07 11:55:39 +03:00
Murat Tuncer b06d10529e
Make sure spinlock is not left unreleased when an exception is thrown
A spinlock is not released when an exception is thrown after
spinlock is acquired. This has caused infinite wait and eventual
crash in maintenance daemon.

This work moves the code than can fail to the outside of spinlock
scope so that in the case of failure spinlock is not left locked
since it was not locked in the first place.
2019-01-07 11:49:31 +03:00
Hanefi Onaldi 5877ee3030 Bump version to 8.1.0 2018-12-19 17:24:33 +03:00
Hanefi Onaldi f7bc15a6ab Citus 8.1.0 changelog 1545053355 (#2553)
* Add changelog entry for 8.1.0
2018-12-18 15:57:29 +03:00
Hanefi Onaldi 7bbe960662 Add changelog entry for 8.0.2 (#2546) 2018-12-17 10:54:39 +03:00
Hanefi Onaldi 8ed521f831 Added changelog entry for 7.5.4 (#2538) 2018-12-17 10:51:59 +03:00
Nils Dijk b4d3df902d upgrade default ssl_ciphers to more restrictive on extension creation
Show ssl_ciphers in ssl_by_default_test
2018-12-13 15:05:08 +03:00
Jason Petersen 4016e09ccf
Fix control file version 2018-12-11 18:50:38 -07:00
Jason Petersen 26fe1f7c32
Bump SQL version
Should have been done when the release-8.0 branch was created…
2018-12-10 19:59:44 -07:00
Burak Velioglu 7aaf6b2cb3
Merge pull request #2533 from citusdata/fix_function_oid
Fix function oid
2018-12-10 14:33:50 +03:00
velioglu 90704d9a52 Fix getting function oid to get hll_add_agg id 2018-12-10 14:16:19 +03:00
velioglu 3e0cff94a6 Add FunctionOidExtended function 2018-12-10 11:59:41 +03:00
Nils Dijk 4af40eee76 Enable SSL by default during installation of citus 2018-12-07 11:23:19 -07:00
Burak Velioglu fd3b0044b4
Merge pull request #2523 from citusdata/disable_hashagg_hll
Adds support for disabling hash agg with hll functions on coordinator
2018-12-07 19:16:19 +03:00
velioglu 8764a19464 Adds support for disabling hash agg with hll functions on coordinator query 2018-12-07 18:49:25 +03:00
Marco Slot 298613824e
Merge pull request #2496 from citusdata/limit_transmit
Only allow transmit from pgsql_job_cache directory
2018-12-06 16:25:47 +01:00
Marco Slot 9cf91c438b Only allow transmit from pgsql_job_cache directory 2018-12-05 10:18:27 +01:00
Marco Slot 2967d8e65f
Merge pull request #2520 from citusdata/remove_memcpy
Remove odd memcpy usage in BuildCachedShardList
2018-12-04 19:32:33 +01:00
Marco Slot 7c2a2d08af
Merge pull request #2511 from citusdata/planner_readme
Expand planner readme
2018-12-04 14:29:37 +01:00
Marco Slot 70fb9c851b Remove odd memcpy usag in BuildCachedShardList 2018-12-04 14:09:10 +01:00
Marco Slot 96b091a1e5
Merge pull request #2516 from citusdata/security-audit
Review some strcpy/memcpy/strprintf/sscanf usage in the code.
2018-12-04 13:08:18 +01:00
Önder Kalacı cb119f4f73
Merge pull request #2514 from citusdata/fix_total_procs
Ensure to use initialized MaxBackends
2018-12-04 11:41:30 +01:00
Marco Slot 0388324fbe Expand planner readme 2018-12-04 09:55:19 +01:00
Dimitri Fontaine d1b182de7d Replace calls to unsafe functions like memcpy and sscanf
In answer to a security audit, we double check buffer sizes and avoid
known-dangerous operations such as sscanf.
2018-12-04 08:54:43 +01:00
Onder Kalaci 621ccf3946 Ensure to use initialized MaxBackends
Postgresql loads shared libraries before calculating MaxBackends.
However, Citus relies on MaxBackends being set. Thus, with this
commit we use the same steps to calculate MaxBackends while
Citus is being loaded (e.g., PG_Init is called).

Note that this is safe since all the elements that are used to
calculate MaxBackends are PGC_POSTMASTER gucs and a constant
value.
2018-12-03 13:25:51 +03:00
Onder Kalaci b6ebd791a6 Sort task list for multi-task explain outputs
This is purely for ensuring that regression tests do not randomly fail.
2018-11-30 11:19:37 -07:00
Önder Kalacı 89d32af3ad
Merge pull request #2509 from citusdata/fix_partitioning_test
Make sure the explain output for partition wise join is stable
2018-11-30 15:16:01 +01:00
Onder Kalaci 18c9badff5 Make sure the explain output for partition wise join is stable
We disable bunch of planning options on the workers. This might be
risky if any concurrent test relies on EXPLAIN OUTPUT as well. Still,
we want to keep this test, so we should try to not parallelize this
test with such test.
2018-11-30 16:44:57 +03:00
Burak Velioglu e2c4efbaa4
Merge pull request #2305 from citusdata/insert_select_onconflict
INSERT...SELECT via coordinator with ON CONFLICT/RETURNING
2018-11-30 16:23:49 +03:00
Marco Slot 8893cc141d Support INSERT...SELECT with ON CONFLICT or RETURNING via coordinator
Before this commit, Citus supported INSERT...SELECT queries with
ON CONFLICT or RETURNING clauses only for pushdownable ones, since
queries supported via coordinator were utilizing COPY infrastructure
of PG to send selected tuples to the target worker nodes.

After this PR, INSERT...SELECT queries with ON CONFLICT or RETURNING
clauses will be performed in two phases via coordinator. In the first
phase selected tuples will be saved to the intermediate table which
is colocated with target table of the INSERT...SELECT query. Note that,
a utility function to save results to the colocated intermediate result
also implemented as a part of this commit. In the second phase, INSERT..
SELECT query is directly run on the worker node using the intermediate
table as the source table.
2018-11-30 15:29:12 +03:00
Hanefi Onaldi a9c299473b
Merge pull request #2507 from citusdata/error_out_grouping_sets_in_subqueries
Error out when a subquery has grouping set clause
2018-11-30 15:14:45 +03:00
Hanefi Onaldi 088a2ef66a throw an error when a subquery has grouping set clause 2018-11-30 13:11:32 +03:00
Önder Kalacı 5a8c79430e
Merge pull request #2508 from citusdata/fix_citus_stat_activity
Ensure that citus_dist_activity test outputs do not change
2018-11-30 10:19:27 +01:00
Onder Kalaci a15f168ce4 Ensure that citus_dist_activity test outputs do not change
Since there is no lock ordering among the query that is executed
and the select from the view, we prefer to add a timeout before
priting the activity.
2018-11-30 11:46:17 +03:00
Nils Dijk e17d98b0e3
Merge pull request #2486 from citusdata/fix/create-distributed-table-as-owner
Fix create_distributed_table as non-table-owner
2018-11-29 16:16:34 +01:00
Nils Dijk 9309e63156
create_distributed_table as user, change table ownership during create 2018-11-29 14:20:42 +01:00
Nils Dijk 6aa191f72c
remove table_ddl_command_array and test master_get_table_ddl_events 2018-11-29 14:20:42 +01:00
Murat Tuncer cc2422efee
Merge pull request #2505 from citusdata/fix_stat_statements_view
Fix citus_stat_statements view
2018-11-29 16:16:52 +03:00
Murat Tuncer fd868ec268 Fix citus_stat_statements view
Join between pg_stat_statements and citus_query_stats should
include queryid, dbid, userid instead of just queryid.
2018-11-29 14:49:16 +03:00