Commit Graph

7087 Commits (2e00d3747f8fbc67f53516c7c5ba66edd87906b0)

Author SHA1 Message Date
gindibay 2e00d3747f Fixes review comments 2023-11-27 22:42:52 +03:00
gindibay 2608d942a2 Fixes review comments 2023-11-27 22:37:31 +03:00
gindibay 2fd191a8eb Merge branch 'alter_database_additional_options' of https://github.com/citusdata/citus into alter_database_additional_options 2023-11-27 22:23:40 +03:00
Gürkan İndibay 0526033750
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-27 22:29:28 +03:00
gindibay 0c25b72a17 Fixes review notes 2023-11-27 22:23:38 +03:00
Gürkan İndibay 9301531941
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-27 22:19:42 +03:00
gindibay 455620cead Details coment for AppendBasicAlterDatabaseOptions 2023-11-22 04:45:38 +03:00
gindibay cd8e4e61a2 Fixes indentation 2023-11-22 04:23:55 +03:00
gindibay 1900c8e0f4 Fixes codecov issue 2023-11-22 04:23:28 +03:00
gindibay 63e3738f46 Fixes pre review check results 2023-11-22 03:33:03 +03:00
gindibay 49b1f9a095 Fixes create_drop_propagation test error 2023-11-22 02:11:11 +03:00
gindibay 5aae80f284 Fixes review notes 2023-11-22 01:49:14 +03:00
gindibay 5f263c1b39 Fixes review notes 2023-11-22 01:34:47 +03:00
gindibay 9d7e601e1d Fixes review notes 2023-11-21 23:36:32 +03:00
gindibay ed3ebf2296 Removes unnecessary comment change 2023-11-21 20:22:02 +03:00
gindibay a747699b0d Removes duplicated includes 2023-11-21 20:20:42 +03:00
gindibay 752c2ee441 Fixes indentation 2023-11-21 19:52:57 +03:00
gindibay d528ec2f67 Fixes merge errors 2023-11-21 19:47:20 +03:00
gindibay 3dd4735e6e Fixes runtime errors 2023-11-21 19:40:44 +03:00
gindibay a1ab60f5ad Merge branch 'main' into alter_database_additional_options 2023-11-20 14:40:52 +03:00
Gürkan İndibay dc93ca8913
Update src/backend/distributed/commands/database.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-21 16:50:40 +03:00
Gürkan İndibay 3b556cb5ed
Adds create / drop database propagation support (#7240)
DESCRIPTION: Adds support for propagating `CREATE`/`DROP` database

In this PR, create and drop database support is added.

For CREATE DATABASE:
* "oid" option is not supported
* specifying "strategy" to be different than "wal_log" is not supported
* specifying "template" to be different than "template1" is not
supported

The last two are because those are not saved in `pg_database` and when
activating a node, we cannot assume what parameters were provided when
creating the database.

And "oid" is not supported because whether user specified an arbitrary
oid when creating the database is not saved in pg_database and we want
to avoid from oid collisions that might arise from attempting to use an
auto-assigned oid on workers.

Finally, in case of node activation, GRANTs for the database are also
propagated.

---------

Co-authored-by: Jelte Fennema-Nio <github-tech@jeltef.nl>
Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-21 16:43:51 +03:00
gindibay c123fc38ec Fixes indentation 2023-11-20 00:57:38 +03:00
gindibay 73db50d34c Removes database rename for each node 2023-11-20 00:56:51 +03:00
gindibay 2207846d48 Fixes warning 2023-11-20 00:36:53 +03:00
Gürkan İndibay 7794aab38c
Merge branch 'create_alter_database' into alter_database_additional_options 2023-11-20 11:16:21 +03:00
Gürkan İndibay 022b6268bf
Merge branch 'main' into create_alter_database 2023-11-20 11:08:21 +03:00
Naisila Puka cedcc220bf
Fixes flaky VACUUM (freeze, process toast true) result (#7348)
https://app.circleci.com/pipelines/github/citusdata/citus/34550/workflows/5b802f66-2666-4623-a209-6d7799f7ee5f/jobs/1229153
```diff
VACUUM (FREEZE, PROCESS_TOAST true) local_vacuum_table;
 SELECT relfrozenxid::text::integer > :frozenxid AS frozen_performed FROM pg_class
 WHERE oid=:reltoastrelid::regclass;
  frozen_performed 
 ------------------
- t
+ f
 (1 row)
```
Process toast option in vacuum was introduced in PG14. The failing test
was supposed to be a part of `multi_utilities.sql`, but it was included
in `pg14.sql` to avoid alternative output for PG13. See
ba62c0a148 (diff-ed03478f693155e2fe092e9ad356bf884dc097f554e8d75eff562d52bbcf7a75L255-L272)
for reference.
However, now that we don't support PG13 anymore, we can move this test
to `multi_utilities.sql`. Moving the test, plus inserting data before
running vacuum freeze such that the freeze is more meaningful and not
flaky, fixes the flakiness problem of the test.
2023-11-17 18:58:06 +03:00
Naisila Puka c88bf5ff1c
Cleanup leftover replication slots in publication test (#7354) 2023-11-17 15:11:38 +03:00
Japin Li e14e8667cc
Fix redundant variable declaration (#7353)
The `$workerCount` declare twice in
src/test/regress/pg_regress_multi.pl.
2023-11-17 13:01:23 +03:00
Gürkan İndibay 32b0fc23f5
Removes unnecessary package installations in packaging pipelines (#7341)
With the recent changes in packaging images, linux package installations
to execute validate_output is unnecessary now.
In this PR, I removed them to make the pipeline more effective. 

- [x] Remove the test warning before merge
2023-11-17 08:51:56 +03:00
Naisila Puka 55d500de8d
Remove accidentally added gucs.out (#7349) 2023-11-16 14:51:31 +03:00
Hanefi Onaldi 5efd3f181a
Fix wrong PR links in changelog (#7350)
When preparing changelog for 12.1.1 release, I accidentally swapped
the PR numbers for the two commits. This commit fixes the changelog
to point to the correct PRs.
2023-11-16 14:12:17 +03:00
Naisila Puka 0d1f18862b
Propagates SECURITY LABEL ON ROLE stmt (#7304)
We propagate `SECURITY LABEL [for provider] ON ROLE rolename IS
labelname` to the worker nodes.
We also make sure to run the relevant `SecLabelStmt` commands on a
newly added node by looking at roles found in `pg_shseclabel`.

See official docs for explanation on how this command works:
https://www.postgresql.org/docs/current/sql-security-label.html
This command stores the role label in the `pg_shseclabel` catalog table.

This commit also fixes the regex string in
`check_gucs_are_alphabetically_sorted.sh` script such that it escapes
the dot. Previously it was looking for all strings starting with "citus"
instead of "citus." as it should.

To test this feature, I currently make use of a special GUC to control
label provider registration in PG_init when creating the Citus extension.
2023-11-16 13:12:30 +03:00
gindibay 58bb165145 Removes unnecessary comments 2023-11-16 10:19:00 +03:00
gindibay da72cd3cf1 Fixes quotes for db columns 2023-11-16 10:03:02 +03:00
Gürkan İndibay 3a6bf7e9ea
Merge branch 'main' into create_alter_database 2023-11-17 13:40:57 +03:00
gindibay c63f124c93 Fixes indentation 2023-11-16 09:08:45 +03:00
gindibay 1cdae74a4c Fixes review notes 2023-11-16 08:45:20 +03:00
gindibay e56a113572 Adds missing line 2023-11-16 08:09:09 +03:00
gindibay a948358d63 Fixes multi_test_helpers 2023-11-16 08:01:44 +03:00
gindibay ef2a47e882 Fixes function after merge 2023-11-16 07:20:59 +03:00
gindibay a6e16252d1 Removes extra line 2023-11-16 05:34:41 +03:00
gindibay 56bc813bd0 Adds check_database_on_all_nodes 2023-11-16 05:13:10 +03:00
gindibay ed9021ca90 Merge branch 'main' of https://github.com/citusdata/citus into create_alter_database 2023-11-16 04:37:01 +03:00
gindibay 8443ae36e7 Fixes indentation 2023-11-16 02:59:32 +03:00
gindibay 95572c5ada Adds EnableCreateDatabasePropagation flag check 2023-11-16 02:58:56 +03:00
gindibay b474d98e5c Removes log 2023-11-15 23:09:35 +03:00
gindibay bb2b7ae9da Adds logs for test 2023-11-15 23:02:21 +03:00
gindibay a68587391c Fixes indentation 2023-11-15 21:32:28 +03:00