pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: fujimoto@ceptord.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14788: `pg_restore -c` won't restore schema access privileges.
Date: Thu, 24 Aug 2017 10:26:05 -0400
Message-ID: <20170824142605.GD4628@tamriel.snowman.net> (raw)
In-Reply-To: <11976.1503584315@sss.pgh.pa.us>
References: <20170821104439.1455.12525@wrigleys.postgresql.org>
	<11976.1503584315@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> fujimoto@ceptord.net writes:
> > [ dump to archive, then pg_restore with -c option ]
> 
> > Now all the access privileges on the public schema are gone:
> 
> I can confirm this is broken in HEAD: "pg_dump -c test >test.out"
> produces a script including "GRANT ALL ON SCHEMA public TO PUBLIC",
> but "pg_dump -Fc test >test.dump; pg_restore -c test.dump" produces
> a script lacking that.

Ugh.

> Stephen attempted to fix this in 330b84d8c, but the fix was evidently done
> incorrectly.  There should never be any difference between the results of
> these two procedures.  I've not studied 330b84d8c, but my strong suspicion
> is that the logic was added to the wrong place in pg_dump.

I'm afraid it's not quite that simple, unfortunately.

I'll see what I can do though.  I'm really curious how this was working
previously..

Thanks!

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (9+ messages)  latest in thread

Message-ID: <20170824142605.GD4628@tamriel.snowman.net>
Permalink:  ../20170824142605.GD4628@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20170824142605.GD4628@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: sfrost@snowman.net, tgl@sss.pgh.pa.us, fujimoto@ceptord.net
  Subject: Re: BUG #14788: `pg_restore -c` won't restore schema access privileges.
  In-Reply-To: <20170824142605.GD4628@tamriel.snowman.net>
  References: <20170821104439.1455.12525@wrigleys.postgresql.org> <11976.1503584315@sss.pgh.pa.us> <20170824142605.GD4628@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox