Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkt61-0008U8-9U for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Aug 2017 14:26:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dkt60-00081T-SS for pgsql-bugs@arkaria.postgresql.org; Thu, 24 Aug 2017 14:26:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dkt5J-0006mr-Oc for pgsql-bugs@postgresql.org; Thu, 24 Aug 2017 14:26:13 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dkt5C-0006hS-LL for pgsql-bugs@postgresql.org; Thu, 24 Aug 2017 14:26:12 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id CB5295F79B; Thu, 24 Aug 2017 10:26:05 -0400 (EDT) Date: Thu, 24 Aug 2017 10:26:05 -0400 From: Stephen Frost To: Tom Lane Cc: fujimoto@ceptord.net, pgsql-bugs@postgresql.org Subject: Re: BUG #14788: `pg_restore -c` won't restore schema access privileges. Message-ID: <20170824142605.GD4628@tamriel.snowman.net> References: <20170821104439.1455.12525@wrigleys.postgresql.org> <11976.1503584315@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QYbVZeIcWGyl4ugF" Content-Disposition: inline In-Reply-To: <11976.1503584315@sss.pgh.pa.us> User-Agent: Mutt/1.5.21 (2010-09-15) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org --QYbVZeIcWGyl4ugF Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Tom Lane (tgl@sss.pgh.pa.us) wrote: > fujimoto@ceptord.net writes: > > [ dump to archive, then pg_restore with -c option ] >=20 > > Now all the access privileges on the public schema are gone: >=20 > 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 --QYbVZeIcWGyl4ugF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJZnuH9AAoJEO1sijiDR2RV6TsQAL5u+HSUJl2g0jwxWg/Ss34m vVe+XNKBZ2R2M0owP87oohEUYZBF78fcRjYhX26OO4Qim91ND5nuDb/n5oF7gQ5R jymrZ1YDhSt7rOwSn4Nr0AqMomNUGfB7ZXPo+X5RuZtEcMG2yrMvBohmWfdnzeY2 BqKCabv5Z4gghsdS1+YuTjHKNPvnxIYJ7Yp+JxNMeUmsZUBQTuaAFGrlKPeAgmSL 5SoVg6YvQbvqThA5V8tQWcPWSn6jbAXXAyXN7gCpHuXV7ByieG5RoTLwNG/TgssI 6cvhB2Jx6jYupl/8H5Pj+XQ05NOLgB3l/WSX0VC6meRMDY7TIbXHrKlcV7t610jA vbyMI2q9lG6iGyWC8R69WpyC8+v1KvGU61E4JhVa5lsjmWZVb86WTH7g96ckmWPZ +jybMu5ciow3/Ku1xDnIxW9O32vv3TqxBqEH5Pt+fJJiv7vmTrHrrPibPyHXGSb5 pLXkJSJQ+CGxS1hoMB8nglXCxm8Sn/T9liCFcrIKgjsNodKNdNkpO974CBkmuU/2 GyeIkdKu4tvrxHDoOTxDqzEp6tRHXdBABmnYUM1A6BFmEsyv5Uxr+13eVDqRCTHl hKN/MVSvkfFs8INbqe5B+ZL1IFxH7RWaQyCDdWQXQNtIu1IaVuECrhZeNWhI2i5N TiYrYMbldtE042nzP8NC =JQzQ -----END PGP SIGNATURE----- --QYbVZeIcWGyl4ugF--