rafaelma / pgbackman

PostgreSQL backup manager

Home Page:https://e-mc2.net/projects/pgbackman/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change the original owner of the database when running a restore

rafaelma opened this issue · comments

We can change the name of the target database but not of the target owner, fix this.

We can use --role=ROLENAME and -O, --no-owner in the extra parameters field to define a new owner of the objects in the database. But the CREATE DATABASE command uses the original owner of the database, we have to change this if the user uses a --role / -O under the restoration of a backup.