Commit Graph

6951 Commits (alter_database_nonmain2)

Author SHA1 Message Date
gurkanindibay 8952e06002 Fixes failure setup 2024-03-25 17:41:09 +03:00
gurkanindibay 3df18fe174 Adds into base_isolation 2024-03-25 17:38:16 +03:00
gurkanindibay a29c8125aa Fixes isolation tests 2024-03-25 17:04:03 +03:00
gurkanindibay 3564492c90 Rollbacks failure setup 2024-03-25 16:56:00 +03:00
gurkanindibay b74ae1ea18 Fixes failure tests 2024-03-25 16:54:56 +03:00
gurkanindibay 48b84b177a Fixes single node ent 2024-03-25 16:34:57 +03:00
gurkanindibay a6a76c7a36 Fixes enable ddl prop 2024-03-25 16:33:37 +03:00
gurkanindibay 68985c21d6 Fixes enable_ddl propagation 2024-03-25 16:03:39 +03:00
gurkanindibay d70304af86 Fixes test errors 2024-03-25 15:45:10 +03:00
gurkanindibay 2cbf8708cf Fixes test errors 2024-03-25 15:30:59 +03:00
gurkanindibay 1f0ec0fc90 Uses enable_ddl_propagation file 2024-03-25 15:00:33 +03:00
gurkanindibay 35c808e120 Adds follower ddl propagation 2024-03-25 13:16:41 +03:00
gurkanindibay c049b5159f Changes the order for isolation setup 2024-03-25 13:03:54 +03:00
gurkanindibay ac2ca93768 Adds logs to show flag value 2024-03-25 13:01:17 +03:00
gurkanindibay f88d66cfa8 Fixes enterprise isolation 2024-03-25 12:47:14 +03:00
gurkanindibay 18a8108df2 Fixes test errors 2024-03-25 12:10:17 +03:00
gurkanindibay 7ab7ffe6b9 Fixes enable_ddl propagation 2024-03-25 11:56:19 +03:00
gurkanindibay 816540860b Adds ddl_propagation to multi_test_helpers 2024-03-25 11:43:23 +03:00
gurkanindibay 2bb01f9e76 Adds config as seperate file 2024-03-22 16:22:25 +03:00
gurkanindibay 1b24b3c5ff Fixes test error 2024-03-22 15:04:17 +03:00
gurkanindibay 48e959522b Fixes indentation errors 2024-03-22 14:51:05 +03:00
gurkanindibay c558caf4bb Fixes some test errors 2024-03-22 14:48:06 +03:00
gurkanindibay a4563cab45 Adds additional test file for multiextension 2024-03-22 14:31:54 +03:00
gurkanindibay 2df875c92f Fixes multiextension 2024-03-22 13:38:26 +03:00
gurkanindibay 426397fa77 Adds check enabled for some sqls 2024-03-22 12:58:58 +03:00
gurkanindibay d3962381e9 Fixes test errors 2024-03-22 11:53:10 +03:00
gurkanindibay 9815a7262d Adds db rename and refreshcoll 2024-03-22 11:37:21 +03:00
Onur Tirtir 3929a5b2a6
Fix incorrect "VALID UNTIL" assumption made for roles in node activation (#7534)
Fixes https://github.com/citusdata/citus/issues/7533.

DESCRIPTION: Fixes incorrect `VALID UNTIL` setting assumption made for
roles when syncing them to new nodes
2024-03-20 11:38:33 +00:00
Emel Şimşek fdd658acec
Fix crash caused by some form of ALTER TABLE ADD COLUMN statements. (#7522)
DESCRIPTION: Fixes a crash caused by some form of ALTER TABLE ADD COLUMN
statements. When adding multiple columns, if one of the ADD COLUMN
statements contains a FOREIGN constraint ommitting the referenced
columns in the statement, a SEGFAULT occurs.

For instance, the following statement results in a crash:

```
  ALTER TABLE lt ADD COLUMN new_col1 bool,
                          ADD COLUMN new_col2 int references rt;

```                      


Fixes #7520.
2024-03-20 11:06:05 +03:00
Onur Tirtir 0acb5f6e86
Fix assertion failure in maintenance daemon during Citus upgrades (#7537)
Fixes https://github.com/citusdata/citus/issues/7536.

Note to reviewer:

Before this commit, the following results in an assertion failure when
executed locally and this won't be the case anymore:
```console
make -C src/test/regress/ check-citus-upgrade-local citus-old-version=v10.2.0
```

Note that this doesn't happen on CI as we don't enable assertions there.

---------

Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2024-03-20 00:10:12 +00:00
gurkanindibay 879ab1821a Merge branch 'main' into alter_database_nonmain2 2024-03-20 01:15:17 +03:00
Onur Tirtir d129064280
Refactor the code that supports node-wide object mgmt commands from non-main dbs (#7544)
RunPreprocessNonMainDBCommand and RunPostprocessNonMainDBCommand are
the entrypoints for this module. These functions are called from
utility_hook.c to support some of the node-wide object management
commands from non-main databases.

To add support for a new command type, one needs to define a new
NonMainDbDistributeObjectOps object and add it to
GetNonMainDbDistributeObjectOps.
2024-03-19 14:26:17 +01:00
gurkanindibay 2fade94359 Fixes test errors 2024-03-18 18:14:07 +03:00
gurkanindibay 1842c2e3b6 Fixes pg14 compile error 2024-03-18 18:04:23 +03:00
gurkanindibay ff19400238 Fixes test errors 2024-03-18 17:46:29 +03:00
gurkanindibay 7ad5a2479b Moves code from the branch 2024-03-18 16:26:08 +03:00
Hanefi Onaldi bf05bf51ec
Refactor one helper function (#7562)
The code looks simpler and easier to read now.
2024-03-18 12:06:49 +00:00
Onur Tirtir 312051e93d
Merge branch 'main' into refactor-nonmain-db-path 2024-03-14 12:07:10 +01:00
eaydingol 8afa2d0386
Change the order in which the locks are acquired (#7542)
This PR changes the order in which the locks are acquired (for the
target and reference tables), when a modify request is initiated from a
worker node that is not the "FirstWorkerNode".


To prevent concurrent writes, locks are acquired on the first worker
node for the replicated tables. When the update statement originates
from the first worker node, it acquires the lock on the reference
table(s) first, followed by the target table(s). However, if the update
statement is initiated in another worker node, the lock requests are
sent to the first worker in a different order. This PR unifies the
modification order on the first worker node. With the third commit,
independent of the node that received the request, the locks are
acquired for the modified table and then the reference tables on the
first node.

The first commit shows a sample output for the test prior to the fix. 

Fixes #7477

---------

Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2024-03-10 10:20:08 +03:00
copetol 12f56438fc
Fix segfault when using certain DO block in function (#7554)
When using a CASE WHEN expression in the body
of the function that is used in the DO block, a segmentation
fault occured. This fixes that.

Fixes #7381

---------

Co-authored-by: Konstantin Morozov <vzbdryn@yahoo.com>
2024-03-08 14:21:42 +01:00
Karina f0043b64a1
Fix server crash when trying to execute activate_node_snapshot() on a single-node cluster (#7552)
This fixes #7551 reported by Egor Chindyaskin

Function activate_node_snapshot() is not meant to be called on a cluster
without worker nodes. This commit adds ERROR report for such case to
prevent server crash.
2024-03-07 11:08:19 +01:00
eaydingol edcdbe67b1
Fix: store the previous shard cost for order verification (#7550)
Store the previous shard cost so that the invariant checking performs as
expected.
2024-03-06 14:46:49 +03:00
sminux d59c93bc50
fix bad copy-paste rightComparisonLimit (#7547)
DESCRIPTION: change for #7543
2024-03-05 08:49:35 +01:00
Onur Tirtir c4d4b42d8b improve 2024-02-29 01:42:18 +03:00
Onur Tirtir b13d6763e7 improve 2024-02-29 01:20:27 +03:00
Onur Tirtir 80360e464b improve 2024-02-29 01:17:25 +03:00
Onur Tirtir d9d9519300 rename 2024-02-29 01:13:56 +03:00
Onur Tirtir cd20ab76c0 phase4: improve the infra and add nice comments 2024-02-29 01:11:37 +03:00
Onur Tirtir 3bdecb10a0 phase3: generalize the fact that some commands cannot be exec in a xact 2024-02-28 18:44:49 +03:00
Onur Tirtir fadee4e494 phase 2: remove the clutter in utiity_hook.c and some funct renaming 2024-02-28 18:28:18 +03:00