Commit Graph

5821 Commits (velioglu/prop_view_temp)

Author SHA1 Message Date
Burak Velioglu 1123468ebd Merge branch 'master' into velioglu/view_propagation 2022-05-07 18:48:53 +03:00
Burak Velioglu a2158794bd
Merge pull request #5926 from citusdata/velioglu/syncMetadataViaObject
Use object address instead of relation id on DDLJob to decide on syncing metadata
2022-05-06 15:43:49 +03:00
Burak Velioglu 3b8fc62fc2 Give notice while converting table type 2022-05-06 00:06:52 +03:00
Burak Velioglu 06a94d167e Use object address instead of relation id on DDLJob to decide on syncing metadata 2022-05-05 17:59:44 +03:00
Önder Kalacı 63f229928f
Merge pull request #5925 from citusdata/use_less_mem
Refrain reading the metadata cache for all tables during upgrade
2022-05-05 09:07:47 +02:00
Onder Kalaci f193e16a01 Refrain reading the metadata cache for all tables during upgrade
First, it is not needed. Second, in the past we had issues regarding
this: https://github.com/citusdata/citus/pull/4344

When I create 10k tables, ~120K shards, this saves
40Mb of memory during ALTER EXTENSION citus UPDATE.

Before the change:  MetadataCacheMemoryContext: 41943040 ~ 40MB
After the change:  MetadataCacheMemoryContext: 8192
2022-05-04 16:44:06 +02:00
Marco Slot 0e1e2275f0
Merge pull request #5920 from citusdata/marcocitus/show-shards-guc 2022-05-03 15:00:09 +02:00
Marco Slot ceb593c9da Convert citus.hide_shards_from_app_name_prefixes to citus.show_shards_for_app_name_prefixes 2022-05-03 14:22:13 +02:00
Jeff Davis 3e1180de78 PG15: handle extra argument to parse_analyze_varparams().
From PG commit 25751f54b8.
2022-05-02 10:12:03 -07:00
Jeff Davis b6a5617ea8 PG15: handle pg_analyze_and_rewrite_* renaming.
From PG commit 791b1b71da.
2022-05-02 10:12:03 -07:00
Jeff Davis 33ee4877d4 PG15: rename pgstat_initstats() -> pgstat_init_relation().
From PG commits bff258a273 and be902e2651.
2022-05-02 10:12:03 -07:00
Jeff Davis 033f9cfff7 PG15: update copied pg_get_object_address() code.
Account for PG commits 5a2832465fd8 and a0ffa885e478.
2022-05-02 10:12:03 -07:00
Jeff Davis bd455f42e3 PG15: handle change to SeqScan structure.
Account for PG commit 2226b4189b. The one site dependent on it can do
just as well with a Scan instead of a SeqScan.
2022-05-02 10:12:03 -07:00
Jeff Davis 3799f95742 PG15: Value -> String, Integer, Float.
Handle PG commit 639a86e36a.
2022-05-02 10:12:03 -07:00
Jeff Davis 26f5e20580 PG15: update integer parsing APIs.
Account for PG commits 3c6f8c011f and cfc7191dfe.
2022-05-02 10:12:03 -07:00
Jeff Davis 70c915a0f2 PG15: Handle data type changes in pg_collation.
Account for PG commit 54637508f8.
2022-05-02 10:12:03 -07:00
Jeff Davis 9915fe8a1a PG15: Handle different ways to get publication actions.
Account for PG commit 52e4f0cd47.
2022-05-02 10:12:03 -07:00
Jeff Davis 1c1ef7ab8d PG15: Handle extra argument to RelationCreateStorage.
Account for PG commit 9c08aea6a309. Introduce
RelationCreateStorage_compat.
2022-05-02 10:12:03 -07:00
Jeff Davis ac952b2cc2 PG15: Handle extra argument to ExecARDeleteTriggers.
Account for PG commit ba9a7e3921. Introduce
ExecARDeleteTriggers_compat.
2022-05-02 10:12:03 -07:00
Jeff Davis f944722c6a PG15: Use RelationGetSmgr() instead of RelationOpenSmgr().
Handle PG commit f10f0ae420.
2022-05-02 10:12:03 -07:00
Hanefi Onaldi 518fb0873e
Introduce one new alternative text output to fix flakiness (#5913)
Here is a flaky test output that is quite hard to fix:

```diff
diff -dU10 -w /home/circleci/project/src/test/regress/expected/isolation_master_update_node_1.out /home/circleci/project/src/test/regress/results/isolation_master_update_node.out
--- /home/circleci/project/src/test/regress/expected/isolation_master_update_node_1.out.modified	2022-03-21 19:03:54.237042562 +0000
+++ /home/circleci/project/src/test/regress/results/isolation_master_update_node.out.modified	2022-03-21 19:03:54.257043084 +0000
@@ -49,18 +49,20 @@
  <waiting ...>
 step s2-update-node-1-force: <... completed>
 master_update_node
 ------------------
                   
 (1 row)
 
 step s2-abort: ABORT;
 step s1-abort: ABORT;
 FATAL:  terminating connection due to administrator command
-SSL connection has been closed unexpectedly
+server closed the connection unexpectedly
+	This probably means the server terminated abnormally
+	before or while processing the request.
```

I could not come up with a solution that would decrease the flakiness in the test outputs. We already have 3 output files for the same test and now I introduced a 4th one.

I can also add complex regular expressions that span multiple lines, and normalize these error messages. Feel free to suggest a normalized error message in a comment here.

## Current alternative file contents

`isolation_master_update_node.out`
```
step s1-abort: ABORT;
FATAL:  terminating connection due to administrator command
FATAL:  terminating connection due to administrator command
SSL connection has been closed unexpectedly
``` 

`isolation_master_update_node_0.out`
```
step s1-abort: ABORT;
WARNING: this step had a leftover error message
FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
``` 

`isolation_master_update_node_1.out`
```
step s1-abort: ABORT;
FATAL:  terminating connection due to administrator command
SSL connection has been closed unexpectedly
``` 

new file: `isolation_master_update_node_2.out`
```
step s1-abort: ABORT;
FATAL:  terminating connection due to administrator command
server closed the connection unexpectedly
	This probably means the server terminated abnormally
	before or while processing the request.
```
2022-04-28 16:52:02 +03:00
Önder Kalacı 1f6783b526
Merge pull request #5906 from citusdata/relax_disable_node
Do not set coordinator's metadatasynced column to false
2022-04-25 09:31:40 +02:00
Onder Kalaci 5fc7661169 Do not set coordinator's metadatasynced column to false
After a disable_node
2022-04-25 09:25:59 +02:00
Önder Kalacı f938f393e5
Merge pull request #5901 from citusdata/fix_local_procs_deadlocks
Do not assign distributed transaction ids for local execution
2022-04-25 09:25:24 +02:00
Burak Velioglu ff003bccd8 Address reviews 2022-04-25 01:54:12 +03:00
Burak Velioglu 5efe6061e8 Test fix 2022-04-22 13:30:44 +03:00
Burak Velioglu 46aef6115e Address reviews 2022-04-21 16:32:50 +03:00
Burak Velioglu 72119112eb Fix option parse 2022-04-20 18:28:07 +03:00
Burak Velioglu 50201f4bec Give WARNING if object is local, ERROR out if it is distributed 2022-04-20 18:02:28 +03:00
Burak Velioglu 81ea6c308c Fix getting the view address 2022-04-20 16:14:47 +03:00
Burak Velioglu 99876709cc Self review 2022-04-20 00:56:43 +03:00
Burak Velioglu 9c6897b26c dont ensure sequential mode 2022-04-20 00:12:51 +03:00
Burak Velioglu 96343b03fa fix remaining tests 2022-04-19 13:40:52 +03:00
Burak Velioglu 8ff1a72706 Add more tests 2022-04-19 13:13:22 +03:00
Burak Velioglu 6de95e2b14
Add view propagation tests 2022-04-14 18:37:01 +03:00
Burak Velioglu b8f673ca91
Add view as known-to-distribute object 2022-04-14 17:42:51 +03:00
Burak Velioglu d76f254904
Check worker node existence before giving a warning message 2022-04-14 15:15:35 +03:00
Burak Velioglu d669efccdb
Test arbitrary config 2022-04-13 16:53:54 +03:00
Burak Velioglu f21a80bbef
Self-review 2022-04-13 16:36:28 +03:00
Onder Kalaci a2debe0f02 Do not assign distributed transaction ids for local execution
In the past, for all modifications on the local execution,
we enabled 2PC (with 6a7ed7b309).

This also required us to enable coordinated transactions
via https://github.com/citusdata/citus/pull/4831 .

However, it does have a very substantial impact on the
distributed deadlock detection. The distributed deadlock
detection is designed to avoid single-statement transactions
because they cannot lead to any actual deadlocks.

The implementation is to skip backends without distributed
transactions are assigned. Now that we assign single
statement local executions in the lock graphs, we are
conflicting with the design of distributed deadlock
detection.

In general, we should fix it. However, one might
think that it is not a big deal, even if the processes
show up in the lock graphs, the deadlock detection
should not be causing any false positives. That is
false, unless https://github.com/citusdata/citus/issues/1803
is fixed. Now that local processes are considered as a single
distributed backend, the lock graphs might find:

    local execution 1 [tx id: 1] -> any local process [tx id: 0]
    any local process [tx id: 0] -> local execution 2 [tx id: 2]

And, decides that there is a distributed deadlock.

This commit is:
   (a) right thing to do, as local execuion should not need any
       distributed tx id
   (b) Eliminates performance issues that might come up with
       deadlock detection does a lot of unncessary checks
   (c) After moving local execution after the remote execution
       via https://github.com/citusdata/citus/pull/4301, the
       vauge requirement for assigning distributed tx ids are
       already gone.
2022-04-13 13:25:12 +02:00
Burak Velioglu a519b84b08
Test arbitrary config fix 2022-04-13 14:16:57 +03:00
Burak Velioglu 55278c9062
Fix multi-1 tests 2022-04-13 02:14:51 +03:00
Burak Velioglu 69cf83ca22
Continue fixing multi tests 2022-04-13 00:56:54 +03:00
Burak Velioglu 68b291754b
Fix isolation tests 2022-04-12 23:25:12 +03:00
Burak Velioglu 483eb29a4f
Fix multi tests 2022-04-12 23:15:51 +03:00
Burak Velioglu 9a0051b151
Fix MX tests 2022-04-12 23:08:57 +03:00
Burak Velioglu 6e5eb862a0
Merge branch 'master' into velioglu/view_propagation 2022-04-12 22:39:30 +03:00
Burak Velioglu 8da75defb6
Fix shard rebalancer test 2022-04-12 22:38:58 +03:00
Burak Velioglu dee6a7ef3c
Quote alias identifier 2022-04-12 16:12:49 +03:00
Hanefi Onaldi 6254f30305
Add arbitrary config tests for function DDL statements (#5885) 2022-04-12 16:03:10 +03:00