Re: Dumping database creation options and ACLs

From: Rafael Martinez <r(dot)m(dot)guerrero(at)usit(dot)uio(dot)no>
To: Adrien Nayrat <adrien(dot)nayrat(at)dalibo(dot)com>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Dumping database creation options and ACLs
Date: 2017-07-03 15:16:26
Message-ID: afebda2a-0e2d-15fb-dbcb-9cdabeafcc7e@usit.uio.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 06/29/2017 06:30 PM, Adrien Nayrat wrote:

> As reported by Ronan there's no other option than using pg_dumpall to restore
> database options and ACLs.
>
> So, we use this trick to stop pg_dumpall before \connect and then use pg_restore:
>
> pg_dumpall -s | sed -rn '/^\\connect/{q}; p' > database+grants.sql
>
>
> Of course, it is not graceful as we just need results of pg_dumpall -g and what
> the dumpCreateDB() function outputs.
>
> What do you think about adding an option like --createdb-only (as suggested by
> Ronan) for this? I'm not fully satisfied with this name though, I'll be happy
> if you have a better suggestion.
>

Hello

We have a discussion about this some time ago and we created a wiki page
where we tried to write down some ideas/proposals and links to threads
discussing the subject:

https://wiki.postgresql.org/wiki/Pg_dump_improvements

regards,
--
Rafael Martinez Guerrero
Center for Information Technology
University of Oslo, Norway

PGP Public Key: http://folk.uio.no/rafael/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2017-07-03 15:27:55 Re: Request more documentation for incompatibility of parallelism and plpgsql exec_run_select
Previous Message Robert Haas 2017-07-03 15:10:39 Re: Request more documentation for incompatibility of parallelism and plpgsql exec_run_select