Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdHHj-0007MG-S3 for pgsql-general@arkaria.postgresql.org; Mon, 13 Feb 2017 14:07:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cdHHj-0006T4-Ey for pgsql-general@arkaria.postgresql.org; Mon, 13 Feb 2017 14:07:19 +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 1cdHFP-0003bU-9K for pgsql-general@postgresql.org; Mon, 13 Feb 2017 14:04:55 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cdHFM-0004gx-Um for pgsql-general@postgresql.org; Mon, 13 Feb 2017 14:04:53 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 857935F794; Mon, 13 Feb 2017 09:04:52 -0500 (EST) Date: Mon, 13 Feb 2017 09:04:52 -0500 From: Stephen Frost To: Adrian Klaver Cc: Frank van Vugt , pgsql-general@postgresql.org Subject: Re: intentional or oversight? pg_dump -c does not restore default priviliges on schema public Message-ID: <20170213140452.GI9812@tamriel.snowman.net> References: <3534542.o3cNaKiDID@techfox> <20170211220617.GG9812@tamriel.snowman.net> <9f29583d-4a82-55e7-619a-5a774dbabd8d@aklaver.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="X6jspQRIhCX2/PVj" Content-Disposition: inline In-Reply-To: <9f29583d-4a82-55e7-619a-5a774dbabd8d@aklaver.com> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 09:02:15 up 219 days, 15:26, 11 users, load average: 0.04, 0.07, 0.12 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org --X6jspQRIhCX2/PVj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Adrian, * Adrian Klaver (adrian.klaver@aklaver.com) wrote: > I am following this up to the point of not understanding what > exactly changed between 9.5 and 9.6. Namely 9.5 does include the > default ACL's in the dump output and 9.6 does not. Quite a bit in pg_dump changed, but the relevant bit here is that we now try to include in the pg_dump output any ACLs which have been changed =66rom their initdb-time settings for initdb-time objects. What that means is that if you don't change the privileges for the public schema =66rom what they're set to at initdb-time, then we don't dump out any ACL commands for the public schema. That ends up being incorrect in '-c' mode because we drop the public schema in that mode and recreate it, in which case we need to re-implement the ACLs which existed for the public schema at initdb-time. Thanks! Stephen --X6jspQRIhCX2/PVj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYob0EAAoJEO1sijiDR2RVIisP/iQQ6yVoDnRTSZICi896T9xA YwPn7Oo2y8nweZRUHSItgzqJO52hrjIaT1iVAOpz689wkYMftYo+2o3eW201YkTr lJ8tfUsXzJFQsvLLJnm+FxY3siEEYEUl72HOwNZB4/9h0jeEissQDN+sc4qqumjB Is6FK3o5+RxUUUukp08PM1LaSBtfTUPTk4/ax5jS9ZaFWMh1R5OjPpp72pWpuM++ Jsbv1Q0GOND4xNiU3++8kkrNvpY5Tup15h/clMko8mg8S77h65tqd3nNcgdhjJ0Z nnHAPDGyPkZi8vvWYua3nQ/HnZkfzPcBGv+Raq0+1bE0lgZU4lYTgVqC+dbUJdUg b/ktKucjyrCxa5L3OCijz7Bukc5VQ5ptPTrkpG/ODNk1jHHBEjpZeVB9WW3Pc5zi 1vXFnR/NwiBFT0et0YJFWBMl9gf+VnFPyZmT9RBB0yBUy0+TghQP1NQGcQKDdFrE NcU0j+YXOlSVt8m8jUMzqFqnmePoCsXH7hqQvB7rFi5gD32BhTzgc5GTx4SMWRky 1utoPO/LwP64EokrT3y7jfNkomPp4drN3vvwEcrVGNCgmir7ILyYzg59xbfwKq2d Ue0UEReltOBNKbgHB6Wgy6rV5MG0j+2lhHDfe22AUHQrDyj7JCdUJhKlQ4VBlWgC 1oVF3As/oM3m3x6Xe/5h =GoSh -----END PGP SIGNATURE----- --X6jspQRIhCX2/PVj--