Re: BUG #18411: Unable to create database with owner on AWS RDS

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: BUG #18411: Unable to create database with owner on AWS RDS
Дата
Msg-id
3442033.1711573259@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
BUG #18411: Unable to create database with owner on AWS RDS PG Bug reporting form <noreply@postgresql.org>
Re: BUG #18411: Unable to create database with owner on AWS RDS Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #18411: Unable to create database with owner on AWS RDS Andrey Lizenko <lizenko79@gmail.com>
Re: BUG #18411: Unable to create database with owner on AWS RDS "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #18411: Unable to create database with owner on AWS RDS Andrey Lizenko <lizenko79@gmail.com>
Re: BUG #18411: Unable to create database with owner on AWS RDS "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #18411: Unable to create database with owner on AWS RDS Myka Dresser <myanodress@gmail.com>
BUG #18411: Unable to create database with owner on AWS RDS "David G. Johnston" <david.g.johnston@gmail.com>
PG Bug reporting form  writes:
> Using the postgres user on AWS RDS, execution of

> CREATE USER my_user WITH PASSWORD 'my-user-password';
> CREATE DATABASE my_database WITH OWNER=my_user;

> Results in an error:

> ERROR:  must be able to SET ROLE "my_user" 
> SQL state: 42501

> However, the following succeeds
> CREATE USER my_user WITH PASSWORD 'my-user-password';
> CREATE DATABASE my_database;
> ALTER DATABASE my_database OWNER TO my_user;

> Is this intended behaviour or am I taking advantage of a bug by creating the
> database and then setting the OWNER using ALTER DATABASE?

Both things fail for me:

regression=# create user admin with createrole createdb;
CREATE ROLE
regression=# \c - admin
You are now connected to database "regression" as user "admin".
regression=> CREATE USER my_user WITH PASSWORD 'my-user-password';
CREATE ROLE
regression=> CREATE DATABASE my_database WITH OWNER=my_user;
ERROR:  must be able to SET ROLE "my_user"
regression=> CREATE DATABASE my_database;
CREATE DATABASE
regression=> ALTER DATABASE my_database OWNER TO my_user;
ERROR:  must be able to SET ROLE "my_user"

I suggest taking this up with AWS.

			regards, tom lane


В списке pgsql-bugs по дате отправления
От: PG Bug reporting form
Дата:
От: Andrey Lizenko
Дата:
FAQ