Commit Graph

6903 Commits (grant_database_2pc_onur_1)

Author SHA1 Message Date
Onur Tirtir 6d73c8381c suggestions 2024-02-20 15:26:13 +03:00
gurkanindibay 6b6522b245 Removes outdated comment from test 2024-02-20 14:00:09 +03:00
Gürkan İndibay eeb9a66747
Merge branch 'main' into grant_database_2pc 2024-02-20 13:58:09 +03:00
gurkanindibay e5bff30814 Fixes checkstyle 2024-02-20 13:37:00 +03:00
gurkanindibay a0e67cb0e2 Resets search path 2024-02-20 13:33:31 +03:00
gurkanindibay 971a4869a9 Fixes review notes 2024-02-20 13:30:01 +03:00
gurkanindibay a8fae40417 Fixes missing flag error 2024-02-20 12:51:54 +03:00
gurkanindibay ad938fd79f Removes grant_on_database tests 2024-02-20 12:45:37 +03:00
gurkanindibay e27e002cb0 Removes parallelization 2024-02-20 12:32:36 +03:00
Onur Tirtir 56e014e64e
Clarify resource-cleaner apis (#7518)
Rename InsertCleanupRecordInCurrentTransaction ->
InsertCleanupOnSuccessRecordInCurrentTransaction and hardcode policy
type as CLEANUP_DEFERRED_ON_SUCCESS.

Rename InsertCleanupRecordInSubtransaction ->
InsertCleanupRecordOutsideTransaction.
2024-02-20 08:57:08 +00:00
gurkanindibay 471bd9bbd6 Merge branch 'grant_database_2pc' of https://github.com/citusdata/citus into grant_database_2pc 2024-02-20 11:24:21 +03:00
gurkanindibay 42970de8f1 Changes schema name to parallelize 2024-02-20 11:24:19 +03:00
Gürkan İndibay e097cfdb32
Merge branch 'main' into grant_database_2pc 2024-02-20 11:07:37 +03:00
Gürkan İndibay 71ccbcf3e2
Adds changelog for v11.0.10 (#7513) 2024-02-20 08:06:57 +00:00
gurkanindibay e0d63eef77 Adds escape characters for tests 2024-02-20 10:57:11 +03:00
gurkanindibay 9bed9aa037 Fixes indentations 2024-02-20 10:48:45 +03:00
gurkanindibay d387843e0c Removes grant_role2pc 2024-02-20 10:45:59 +03:00
gurkanindibay c949800702 Fixes test errors 2024-02-20 10:44:26 +03:00
gurkanindibay 2e3dcf4bd2 Fixes test errors, removes non-used files 2024-02-20 10:39:33 +03:00
gurkanindibay 721e0a13bd Fixes indentation and test issues 2024-02-20 10:20:29 +03:00
gurkanindibay 3a5cc909a4 Fixes test errors after merge 2024-02-20 10:19:19 +03:00
Gürkan İndibay 2cbfdbfa46
Adds Grant Role support from non-main db (#7404)
DESCRIPTION: Adds support for distributed role-membership management
commands from the databases where Citus is not installed (`GRANT <role>
TO <role>`)

This PR also refactors the code-path that allows executing some of the
node-wide commands so that we use send deparsed query string to other
nodes instead of the `queryString` passed into utility hook.

---------

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2024-02-19 17:53:27 +03:00
gurkanindibay 166e27da8e Merge branch 'main' into grant_database_2pc 2024-02-19 16:04:13 +03:00
Gürkan İndibay 9a0cdbf5af
Fixes granted by cascade/restrict statements for revoke (#7517)
DESCRIPTION: Fixes incorrect propagating of `GRANTED BY` and
`CASCADE/RESTRICT` clauses for `REVOKE` statements

There are two issues fixed in this PR
1. granted by statement will appear for revoke statements as well
2. revoke/cascade statement will appear after granted by

Since granted by statements does not appear in statements, this bug
hasn't been visible until now. However, after activating the granted by
statement for revoke, order problem arised and this issue was fixed
order problem for cascade/revoke as well
In summary, this PR provides usage of granted by statements properly now
with the correct order of statements.
We can verify the both errors, fixed with just single statement
REVOKE dist_role_3 from non_dist_role_3 granted by test_admin_role
cascade;
2024-02-19 15:44:21 +03:00
Onur Tirtir 74b55d0546
Enforce using werkzeug 2.3.7 for failure tests and update Postgres versions to latest minors (#7491)
Let's use version 2.3.7 to fix the following error as we do in docker
images created in https://github.com/citusdata/the-process/ repo.
```
ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/home/onurctirtir/.local/share/virtualenvs/regress-ffZKpSmO/lib/python3.9/site-packages/werkzeug/urls.py)
```

And changing werkzeug version required rebuilding Pipfile.lock file in
src/test/regress. Before updating this Pipfile.lock file, we want to
make sure that versions specified there don't break any tests. And to
ensure that this is the case,
https://github.com/citusdata/the-process/pull/155 synchronizes
requirements.txt file based on new Pipfile.lock and hence this PR
updates test image suffix accordingly.

Also, while updating https://github.com/citusdata/the-process/pull/155,
I also had to update Postgres versions to latest minors to make image
builds passing again and updating Postgres versions in images requires
updating Postgres versions in this repo too. While doing that, we also
update Postgres version used in devcontainer too.
2024-02-16 14:38:32 +00:00
eaydingol 15a3adebe8
Support SECURITY LABEL ON ROLE from any node (#7508)
DESCRIPTION: Propagates SECURITY LABEL ON ROLE statement from any node
2024-02-15 20:34:15 +03:00
Gürkan İndibay 59da0633bb
Fixes invalid grantor field parsing in grant role propagation (#7451)
DESCRIPTION: Resolves an issue that disrupts distributed GRANT
statements with the grantor option

In this issue 3 issues are being solved:
1.Correcting the erroneous appending of multiple granted by in the
deparser.
2Adding support for grantor (granted by) in grant role propagation.
3. Implementing grantor (granted by) support during the metadata sync
grant role propagation phase.

Limitations: Currently, the grantor must be created prior to the
metadata sync phase. During metadata sync, both the creation of the
grantor and the grants given by that role cannot be performed, as the
grantor role is not detected during the dependency resolution phase.

---------

Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2024-02-15 08:27:29 +00:00
Gürkan İndibay c665cb8af3
Adds changelog for 11.0.9,11.1.7,11.2.2,11.3.1,12.0.1,12.1.2 (#7507) 2024-02-14 08:40:28 +03:00
Ivan Vyazmitinov 2fae91c5df
Force LC_COLLATE=C for sort in check_gucs_are_alphabetically_sorted.sh (#7489)
Fixed gucs check, as described
[here](https://github.com/citusdata/citus/pull/7286#discussion_r1481049261)
2024-02-08 12:21:21 +01:00
Onur Tirtir 689c6897a4
Refactor CREATE / DROP database functions for better readability (#7486) 2024-02-08 01:55:50 +03:00
eaydingol f01c5f2593
Move remaining citus_internal functions (#7478)
Moves the following functions to the Citus internal schema: 

citus_internal_local_blocked_processes
citus_internal_global_blocked_processes
citus_internal_mark_node_not_synced
citus_internal_unregister_tenant_schema_globally
citus_internal_update_none_dist_table_metadata
citus_internal_update_placement_metadata
citus_internal_update_relation_colocation
citus_internal_start_replication_origin_tracking
citus_internal_stop_replication_origin_tracking
citus_internal_is_replication_origin_tracking_active


#7405

---------

Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2024-02-07 16:58:17 +03:00
Filip Sedlák 6869b3ad10
Fail early when shard can't be safely moved to a new node (#7467)
DESCRIPTION: citus_move_shard_placement now fails early when shard
cannot be safely moved

The implementation is quite simplistic -
`citus_move_shard_placement(...)` will fail with an error if there's any
new node in the cluster that doesn't have reference tables yet.

It could have been finer-grained, i.e. erroring only when trying to move
a shard to an unitialized node. Looking at the related functions -
`replicate_reference_tables()` or `citus_rebalance_start()`, I think
it's acceptable behaviour. These other functions also treat "any"
unitialized node as a temporary anomaly.

Fixes #7426

---------

Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2024-02-07 12:04:52 +00:00
Karina 9ff8436f14
Create directories and files with pg_file_create_mode and pg_dir_create_mode permissions (#7479)
Since Postgres commit da9b580d files and directories are supposed to
be created with pg_file_create_mode and pg_dir_create_mode permissions
when default permissions are expected.

This fixes a failure of one of the postgres tests:
If we create file add.conf containing
```
shared_preload_libraries='citus'
```
and run postgres tests
```
TEMP_CONFIG=/path/to/add.conf make installcheck -C src/bin/pg_ctl/
```
then 001_start_stop.pl fails with
```
.../data/base/pgsql_job_cache mode must be 0750
```
in the log.

In passing this also stops creating directories that we haven't used
since Citus 7.4

This change explicitely doesn't change permissions of certificates/keys
that we create.

---------

Co-authored-by: Karina Litskevich <litskevichkarina@gmail.com>
2024-02-07 12:48:31 +01:00
eaydingol 594cb6f274
Move more citus internal functions (#7473)
Moves the following functions:

 citus_internal_delete_colocation_metadata 
 citus_internal_delete_partition_metadata 
 citus_internal_delete_placement_metadata 
 citus_internal_delete_shard_metadata 
 citus_internal_delete_tenant_schema
2024-01-31 23:00:04 +03:00
eaydingol d05174093b
Move citus internal functions (#7470)
Move more functions to citus_internal schema, the list:

citus_internal_add_placement_metadata
citus_internal_add_shard_metadata
citus_internal_add_tenant_schema
citus_internal_adjust_local_clock_to_remote
citus_internal_database_command

#7405
2024-01-31 11:45:19 +00:00
Onur Tirtir 3ce731d497
Make multi_metadata_sync runnable via run_test.py (#7472) 2024-01-31 09:50:16 +00:00
Onur Tirtir 6f43d5c02f
Enhance technical README for DDL propagation (#7471) 2024-01-31 10:30:14 +01:00
Onur Tirtir 5aedec4242
Improve error message for recursive CTEs (#7407)
Fixes #2870
2024-01-30 15:12:48 +00:00
eaydingol f6ea619e27
Move citus internal functions (#7466)
Move the following functions from pg_catalog to citus_internal:

citus_internal_add_object_metadata
citus_internal_add_partition_metadata


#7405
2024-01-30 12:27:10 +03:00
gurkanindibay 9a2cabec8f Merge branch 'grant_role_2pc' into grant_database_2pc 2024-01-29 23:28:33 +03:00
gurkanindibay 848cf685c2 Changes postprocess logic 2024-01-29 23:26:05 +03:00
gurkanindibay 1ed2f915d2 Fixes merge problems 2024-01-29 23:22:21 +03:00
Gürkan İndibay a759aaf797
Merge branch 'grant_role_2pc' into grant_database_2pc 2024-01-29 22:18:05 +03:00
Gürkan İndibay fb1030f238
Merge branch 'main' into grant_role_2pc 2024-01-29 22:11:55 +03:00
gurkanindibay 4553e1ea5b Fixes indentation 2024-01-29 17:57:09 +03:00
gurkanindibay 71a733cdec Fixes indentation 2024-01-29 17:50:52 +03:00
gurkanindibay 754d5899f2 Refactors MarkObjectDistributed logic 2024-01-29 17:50:27 +03:00
gurkanindibay e2e868166c Fixes naming suggestions 2024-01-29 16:34:37 +03:00
Gürkan İndibay 510e5581ad
Update src/backend/distributed/commands/utility_hook.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2024-01-29 16:33:49 +03:00
Gürkan İndibay 2f45493366
Update src/backend/distributed/commands/utility_hook.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2024-01-29 16:33:42 +03:00