Commit Graph

4633 Commits (bebca9ee79423e1cda5e47d37dbdad5d12e0cffa)

Author SHA1 Message Date
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
Hadi Moshayedi d69bff7621 Use schema config in control file 2020-09-15 10:06:11 -07:00
Onur Tirtir 4118560b75
Prevent citus local table creation from a catalog table (#4158) 2020-09-15 14:30:48 +03:00
Nils Dijk 00cb58135d Merge pull request #7 from citusdata/add-wal
Add wal support
2020-09-15 12:41:41 +02:00
Nils Dijk a94bbcc7ef write wal entries when writing to the buffers 2020-09-15 12:38:50 +02:00
Hadi Moshayedi 139da88ad9 Remove some unnecessary code & fix compiler warnings 2020-09-14 15:08:50 -07:00