Commit Graph

108 Commits (a1ab60f5ad0108058f8032bdf34cedd8e87e4604)

Author SHA1 Message Date
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
Gürkan İndibay 7794aab38c
Merge branch 'create_alter_database' into alter_database_additional_options 2023-11-20 11:16:21 +03:00
gindibay da72cd3cf1 Fixes quotes for db columns 2023-11-16 10:03:02 +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 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 e18c4400dc Removes unnecessary logs 2023-11-15 20:48:17 +03:00
gindibay 6f838e6e88 Fixes indentation 2023-11-15 16:34:02 +03:00
gindibay eb46d9399b Fixes warning on compile 2023-11-15 16:26:14 +03:00
gindibay 9a558bdece Adds datacl propagation 2023-11-15 16:04:26 +03:00
gindibay cf019b858c Adds static declarations 2023-11-14 10:21:23 +03:00
gindibay c1e9335fb7 Adds distributed check in metadata syncing 2023-11-14 09:01:00 +03:00
Gürkan İndibay 7780101619
Update src/backend/distributed/commands/database.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 19:00:40 +03:00
Onur Tirtir c1dce6fc2b commit 2023-11-13 18:02:31 +03:00
Gürkan İndibay 7e15939e50
Update src/backend/distributed/commands/database.c
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 17:15:11 +03:00
gindibay a9977e8840 Moves validation to preprocess for createdb 2023-11-13 15:49:19 +03:00
Gürkan İndibay 8728871cc3
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-13 14:56:24 +03:00
gindibay a35cae0ed7 Fixes review issues 2023-11-13 12:07:40 +03:00
gindibay f8b3f322aa Fixed review items 2023-11-10 08:33:51 +03:00
Gürkan İndibay 3067d1ef08
Apply suggestions from code review
Co-authored-by: Onur Tirtir <onurcantirtir@gmail.com>
2023-11-10 17:34:09 +03:00
gindibay 1b9a8ea2db Fixes indentation 2023-11-10 06:11:43 +03:00
gindibay b5424db419 Fixes compilation errors 2023-11-10 05:46:30 +03:00
gindibay b45543f51b Merge remote-tracking branch 'origin/create_alter_database' into alter_database_additional_options 2023-11-10 05:38:19 +03:00
gindibay 3ab91c91a3 Fixes review comments 2023-11-10 04:59:50 +03:00
gindibay 4c9863c0fb Fixes review comments 2023-11-09 01:49:43 +03:00
gindibay afa60556fd Fixes review comments 2023-11-09 01:43:08 +03:00
Gürkan İndibay 75589d1c11
Apply suggestions from code review
Co-authored-by: Jelte Fennema-Nio <jelte.fennema@microsoft.com>
2023-11-08 17:38:43 +03:00
gindibay 65660db10d Fixes review items 2023-11-08 02:02:00 +03:00
Jelte Fennema-Nio c72f5357e1 Fix PG16 assertion 2023-10-31 16:10:03 +01:00
gindibay 328e34969d Fixes review notes 2023-10-31 13:41:50 +03:00
gindibay 75f1e691c1 Merge branch 'create_alter_database' into alter_database_additional_options 2023-10-31 11:22:52 +03:00
gindibay 2d9181a9ab Fixes indents 2023-10-31 11:00:40 +03:00
gindibay d8639d58de Adds locale restrictions 2023-10-31 10:58:44 +03:00
gindibay b41feadd97 Fixes indent 2023-10-27 10:39:16 +03:00
gindibay 8811d910a5 Fixes pg 14 compile errors 2023-10-27 10:28:09 +03:00
gindibay fe26aebf6c Fixes useless declarations 2023-10-27 09:52:58 +03:00
gindibay 569f4db60c Fixes pg 14 compile warnings 2023-10-27 09:51:15 +03:00
gindibay a797584f1c Fixes tests 2023-10-27 09:07:19 +03:00
gindibay 473f6cbf05 Fixes metadata sync 2023-10-27 08:37:46 +03:00
gindibay 641e413676 Adds metadatasync for create database 2023-10-26 20:36:43 +03:00
gindibay c7b040c3cd Fixes indentation 2023-10-24 15:19:50 +03:00
gindibay 2f52fbd13e Fixes missing ok issue 2023-10-24 15:14:05 +03:00
gindibay 3a0a5ae344 Fixes missin ok issue 2023-10-24 15:13:22 +03:00
gindibay b5cbc048b7 Fixes missing ok issue 2023-10-24 15:12:08 +03:00
gindibay e9e64a69c1 Fixes indentation 2023-10-24 14:18:10 +03:00
gindibay 73f0db2aed Fixes create and drop database transaction use 2023-10-24 14:09:36 +03:00
gindibay c9dae2684f tests db as role 2023-10-24 10:09:13 +03:00