Commit Graph

4188 Commits (c433c66f2bc9a7dce27a50841a1e65b1704af84a)

Author SHA1 Message Date
Jeff Davis 8af9c91540 address review comments 2020-09-21 18:13:14 -07:00
SaitTalhaNisanci dba7e052df
Merge enterprise branch if it exists (#4181)
* Merge enterprise branch if it exists

We should merge the enterprise branch if it exists in the check
enterpise merge job, otherwise the following can happen:
- there is some change on community that breaks the compilation on
enterprise without creating any conflicts
- we fix the compilation issue by opening a branch on enterprise
- the job doesn't see the enterprise specific fix because it doesn't try
to merge enterprise branch if there are no conflicts

* Update ci/check_enterprise_merge.sh

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>

* Simplify the steps

Co-authored-by: Jelte Fennema <github-tech@jeltef.nl>
2020-09-21 19:31:10 +03:00
Önder Kalacı bc293d9d5e
Merge pull request #4167 from citusdata/metadata_improvements
Improve the robustness of function call delegation
2020-09-21 15:14:21 +02:00
Onder Kalaci 5d017cd123 Improve node matedata when coordinator is added
Coordinator should always be always active, hasmetadata and
metadasynced. Prevent changing those fields.
2020-09-21 14:53:41 +02:00
Onder Kalaci 6fc1dea85c Improve the robustness of function call delegation
Pushing down the CALLs to the node that the CALL is executed is
dangerous and could lead to infinite recursion.

When the coordinator added as worker, Citus was by chance preventing
this. The coordinator was marked as "not metadatasynced" node
in pg_dist_node, which prevented CALL/function delegation to happen.

With this commit, we do the following:

  - Fix metadatasynced column for the coordinator on pg_dist_node
  - Prevent pushdown of function/procedure to the same node that
    the function/procedure is being executed. Today, we do not sync
    pg_dist_object (e.g., distributed functions metadata) to the
    worker nodes. But, even if we do it now, the function call delegation
    would prevent the infinite recursion.
2020-09-21 14:53:30 +02:00
SaitTalhaNisanci e7cd1ed0ee
Not take ShareUpdateExlusiveLock on pg_dist_transaction (#4184)
* Not take ShareUpdateExlusiveLock on pg_dist_transaction

We were taking ShareUpdateExlusiveLock on pg_dist_transaction during
recovery to prevent multiple recoveries happening concurrenly. VACUUM(
not FULL) also takes ShareUpdateExclusiveLock, and they can conflict. It
seems that VACUUM will skip the table if there is a conflicting lock
already taken unless it is doing the vacuum to prevent id wraparound, in
which case there can be a deadlock. I guess the deadlock happens if:

- VACUUM takes a lock on pg_dist_transaction and is done for id
wraparound problem
- The transaction in the maintenance tries to take a lock but
cannot as that conflicts with the lock acquired by VACUUM
- The transaction in the maintenance daemon has a very old xid hence
VACUUM cannot proceed.

If we take a row exclusive lock in transaction recovery then it wouldn't
conflict with VACUUM hence it could proceed so the deadlock would be
resolved. To prevent concurrent transaction recoveries happening, an
advisory lock is taken with ShareUpdateExlusiveLock as before.

* Use CITUS_OPERATIONS tag
2020-09-21 15:20:38 +03:00
Jeff Davis c303f0f135 improve rel size estimate 2020-09-18 12:15:08 -07:00
Jeff Davis a05e75a6d1 fixup 2020-09-18 11:59:28 -07:00
Jeff Davis 06f1c96975 almost works 2020-09-18 11:37:39 -07:00
Onur Tirtir e69ee407e1
Merge pull request #4176 from citusdata/refactor/id_list_functions
Refactor the functions that return OID lists for citus tables
2020-09-18 20:49:05 +03:00
Jeff Davis 0f43534845 fixup guc 2020-09-18 09:26:20 -07:00
Jeff Davis fbe4728287 use GUCs 2020-09-18 09:19:41 -07:00
Jeff Davis 9f9bb64c4c fixup 2020-09-18 09:18:03 -07:00
Jeff Davis 12daf4c317 add GUCs 2020-09-18 09:09:02 -07:00
Jeff Davis d7f40f3be6 address review comments 2020-09-18 08:59:45 -07:00
Onur Tirtir 1b31b22635 Refactor the functions that return OID lists for citus tables 2020-09-18 16:42:46 +03:00
SaitTalhaNisanci dae2c69fd7
Not allow removing a single node with ref tables (#4127)
* Not allow removing a single node with ref tables

We should not allow removing a node if it is the only node in the
cluster and there is a data on it. We have this check for distributed
tables but we didn't have it for reference tables.

* Update src/test/regress/expected/single_node.out

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>

* Update src/test/regress/sql/single_node.sql

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2020-09-18 15:35:59 +03:00
SaitTalhaNisanci 6e316d46a2
Remove unused variable (#4172) 2020-09-18 11:25:07 +03:00
Ahmet Gedemenli e076d2a14e
Merge pull request #4168 from citusdata/shorten-insert-select-test
Shorten insert select connection leak test
2020-09-18 10:43:02 +03:00
Ahmet Gedemenli 1cf11b4632 Shorten insert_select_connection_leak_test 2020-09-18 10:07:15 +03:00
Önder Kalacı 8d3f353746
Add more tests for single node citus - distributetd tables (#4166) 2020-09-17 17:50:35 +02:00
Marco Slot 966718c76a
Merge pull request #4171 from citusdata/fix/explain-analyze-truncation
Fix EXPLAIN ANALYZE truncation
2020-09-17 14:56:30 +02:00
Marco Slot c9d46c618b Fix EXPLAIN ANALYZE truncation 2020-09-17 14:42:21 +02:00
Onur Tirtir d81559b7f8
Use "table" instead of "reference table" in sequential truncate log (#4164)
We might get this debug message for citus local tables as well
2020-09-17 14:37:36 +03:00
SaitTalhaNisanci 5723038f74
Comment user provided input memory allocation (#4163) 2020-09-17 13:18:13 +03:00
Jeff Davis b9f2b410b5 fix am_alter test 2020-09-16 15:29:24 -07:00
Jeff Davis d352cd07dd citus indent and Makefile fixup 2020-09-16 11:51:23 -07:00
Jeff Davis 4dfec401ce more Makefile cleanup 2020-09-16 11:10:40 -07:00
Jeff Davis ec8afe0a5d better makefile 2020-09-16 11:10:40 -07:00
Jeff Davis 3b3d1b1f89 11 and 12 both pass 2020-09-16 11:10:40 -07:00
Jeff Davis 248a2db970 fixup 2020-09-16 11:10:40 -07:00
Jeff Davis ada9da609e fixup mod.c 2020-09-16 11:10:40 -07:00
Jeff Davis a3b513167c disable a few tests 2020-09-16 11:10:40 -07:00
Jeff Davis c49acc948a more test fixes........ 2020-09-16 11:10:40 -07:00
Jeff Davis fd6b4aeba2 more tests... 2020-09-16 11:10:39 -07:00
Jeff Davis 7ba75fc2a6 more tests pass 2020-09-16 11:10:39 -07:00
Jeff Davis 83f2d4aef2 more fixes 2020-09-16 11:10:39 -07:00
Jeff Davis 18f6829621 more fixes 2020-09-16 11:10:39 -07:00
Jeff Davis a57b9004a4 tests WIP 2020-09-16 11:10:39 -07:00
Jeff Davis f886fb33e5 add AM tests 2020-09-16 11:10:39 -07:00
Jeff Davis aa422f2da0 fixup rebase 2020-09-16 11:10:39 -07:00
Jeff Davis b06f48a2a7 tableAM updates 2020-09-16 11:10:39 -07:00
Jeff Davis b6ca8fcd70 extension control 2020-09-16 11:10:39 -07:00
Jeff Davis 48e9c17b50 stubs for table access method 2020-09-16 11:10:39 -07:00
jeff-davis 30b78d6f54 Merge pull request #8 from citusdata/circleci-project-setup
Circleci project setup
2020-09-16 09:42:14 -07:00
Nils Dijk 1e93e15a8d fix indentation via citus_indent 2020-09-16 15:22:09 +02:00
Nils Dijk 20a8bca426 add integration files for circle ci
This is based on the circle ci integration we have
for citus, albeit highly simplified.
2020-09-16 15:21:42 +02:00
Nils Dijk 09208986ba remove travis 2020-09-16 15:21:42 +02:00
Jeff Davis fe7ab6df84 Rename tests to be FDW-specific. 2020-09-15 12:51:15 -07:00
Jeff Davis f7f59933f8 fix v11 tests 2020-09-15 12:48:44 -07:00