Allow an user (not superuser) to create a testing database from a production database

Поиск
Список
Период
Сортировка
От Jorge Silva
Тема Allow an user (not superuser) to create a testing database from a production database
Дата
Msg-id CP6P284MB1930AE5210C0F7C566CEC980FE53A@CP6P284MB1930.BRAP284.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответы Re: Allow an user (not superuser) to create a testing database from a production database  (Erik Wienhold <ewie@ewie.name>)
Список pgsql-admin

Hi everyone,

 

We have a database which recurrently we create a testing database making a copy of it. Under the superuser “postgres” we use the command “CREATE DATABASE totvs_test WITH TEMPLATE totvs_production;” which works pretty well.

 

But now I would like to allow an user, which is not the owner of the totvs_production database, and neither is a superuser, to execute this same command.

In order to achieve this, it seems that I have to give him the access “CREATEDB” and make our production database a template database. Do you know if there any safety, performance or any other kind of issue in making our production database as a template in postgres and keep using it for production tasks? This user, who would make this copy, already has access to SELECT in all the data of this database, but they have no rights in DELETE, UPDATE or INSERT.

 

Thanks in advance.

 

 

Jorge Luiz Moreira Silva

Diretor Industrial
Polimet Indústria Metalúrgica

+55 (15) 3363-8633

 

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: SSL enabled connection for PostgreSQL
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: Allow an user (not superuser) to create a testing database from a production database