From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Noah Misch <noah(at)leadboat(dot)com> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Craig Ringer <craig(at)2ndquadrant(dot)com>, Adam Brightwell <adam(dot)brightwell(at)crunchydatasolutions(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp> |
Subject: | Re: security labels on databases are bad for dump & restore |
Date: | 2015-07-30 15:44:04 |
Message-ID: | 20150730154404.GO2441@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Noah Misch wrote:
> What exact formula did you have in mind? It must not be merely
>
> 1. "pg_dumpall -g"
> 2. "pg_dump" (without --create) per database
>
> which _never_ works: it emits no CREATE DATABASE statements. Perhaps this?
>
> 1. "pg_dumpall -g"
> 2. Issue a handwritten CREATE DATABASE statement per database with correct
> encoding, lc_ctype and lc_collate parameters. All other database
> properties can be wrong; the dump will fix them.
> 3. "pg_dump" (without --create) per database
>
> That neglects numerous database properties today, but we could make it work.
> Given the problems I described upthread, it's an inferior formula that I
> recommend against propping up.
Agreed, and IMO it's embarrasing that it's so complicated to get a fully
working backup.
> I much prefer making this work completely:
>
> 1. "pg_dumpall -g"
> 2. "pg_dump --create" per database
My full support for this proposal.
> Another formula I wouldn't mind offering:
>
> 1. "pg_dumpall -g"
> 2. pg_dumpall --empty-databases
> 3. "pg_dump" (without --create) per database
>
> Code for an --empty-databases option already exists for "pg_dumpall -g
> --binary-upgrade". A patch turning that into a user-facing feature might be
> quite compact.
I don't mind if this one is also made to work, but I don't care about
this case all that much.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | José Luis Tallón | 2015-07-30 15:47:06 | Proposal: backend "niceness" / session_priority |
Previous Message | Joshua D. Drake | 2015-07-30 15:12:39 | Re: 64-bit XIDs again |