Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hq4A6-0004cA-Ba for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2019 23:25:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hq496-0008EE-Rk for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2019 23:24:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hq496-0008E6-97 for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2019 23:24:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hq494-0000no-8r for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2019 23:24:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x6NNORo0002740; Tue, 23 Jul 2019 19:24:27 -0400 From: Tom Lane To: Sergey Koposov cc: "adrian.klaver@aklaver.com" , "pgsql-general@lists.postgresql.org" Subject: Re: pg_dump schema in pg11 without global permissions In-reply-to: <1563923841.29206.106.camel@cmu.edu> References: <1563920367.29206.91.camel@cmu.edu> <3c27ead3-134a-d27d-1097-684af2e6a811@aklaver.com> <1563920629.29206.93.camel@cmu.edu> <1563921764.29206.97.camel@cmu.edu> <1563922734.29206.103.camel@cmu.edu> <7bc24eb3-40a7-f402-db03-3b9c00eb1751@aklaver.com> <1563923841.29206.106.camel@cmu.edu> Comments: In-reply-to Sergey Koposov message dated "Tue, 23 Jul 2019 23:17:21 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2738.1563924267.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 23 Jul 2019 19:24:27 -0400 Message-ID: <2739.1563924267@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk [ hey guys, please trim your replies ] Sergey Koposov writes: > On Tue, 2019-07-23 at 16:04 -0700, Adrian Klaver wrote: >> That is only supposed to happen if you use -C(--create) and I am seeing= =C2=A0 >> that in your examples. > For some reason I see when I just have=C2=A0 > a command =C2=A0like this it doesnt' have a grant connect on database > ~/soft/pgsql_install/bin/pg_dump -U skoposov -h localhost -n xx =C2=A0--= no-tablespaces test1 > but when I add =C2=A0'-Fc' flag to pg_dump, I can see 'grant connect' in= side the output (interdispersed with binary stuff) The GRANT CONNECT will be in the archive, but pg_restore should only print it if you specified -C. Experimenting, however, I see that that only works as intended if I use v11 pg_restore. I can replicate your result if I use v10 pg_restore. So ... don't do that. regards, tom lane