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 1hq4Lf-00052x-Bt for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2019 23:37:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hq4Kf-00007q-UJ for pgsql-general@arkaria.postgresql.org; Tue, 23 Jul 2019 23:36:33 +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 1hq4Kd-00007I-Sc for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2019 23:36:33 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1hq4Kb-0000uN-GY for pgsql-general@lists.postgresql.org; Tue, 23 Jul 2019 23:36:30 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C59FB21F76; Tue, 23 Jul 2019 19:36:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 23 Jul 2019 19:36:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm3; bh=U PSxUrslr3wI/rinR6nKVNi5TuXrCNMGIolBgmqz7jQ=; b=I6Ws6hu8kZbKG87it Sx4dr6v2jwUoud/l+i6B/mmKufNfca+/SuVG5Kez4vLSs4JLc3fCiL8GAvyDLMGx u1Ti4q1hzFa+DEB+hFF2shFQUGIB4s3AHscs3kpDvtMRPQ8/OkDra5oQV8JKp3zd nZh/slSRQuytbdzR8CNx7csQ6rWDEFzvLhktxZf7Y1Nm3XFAyhsl5tQosNyeB5fB Mg2A0/Ar7OwpGYh6QM+WEo6vTvXOSbBQp7amonoalFpu8CbwMbI2L3qdvjP3N9op gyZ3vTtMfq/K+mZjmy/5/VtFAs1ZxZVPt2qvXBcGsKVtWQmDKaLwsbrkvTqpZRij LPgHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=UPSxUrslr3wI/rinR6nKVNi5TuXrCNMGIolBgmqz7 jQ=; b=jxBZnfBoiTeBHjYD7NovCk0OBvOPc9nHOT5UpiUix4CbB6SE79MydE4Rj MrAb4F7HIQlPyLVP+BfduOBYjqabHWHN6cjEW4CJLBb3MTzNfWKlOC+bBIIyjkg3 A1ZnF/9tO5lyApgjAeV6B5irNXk4XhGRITC4TFgDZzUdDaYDSGuDzHXxEdfJguUt HkK6XB9XwfClxw5bkv0lr+wBWdGPPxDgUBA9QNSitON/yJzGHEqE6UCRdH7OFwTe fqoKxBljOUple/IjNVMRnbS5OcKRDJSCpoqAZDpMVL+kHej7EqvHRTGDmsJNF/7z qbD6aE2P3IcYm4IcAvt5aeop265fg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrjeelgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefuvfhfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughrihgr nhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh eqnecuffhomhgrihhnpehpohhsthhgrhgvshhqlhdrohhrghenucfkphepjedurddvuddv rdduhedtrddvtddvnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrughrihgrnhdrkhhlrg hvvghrsegrkhhlrghvvghrrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from [192.168.1.4] (unknown [71.212.150.202]) by mail.messagingengine.com (Postfix) with ESMTPA id F0E54380079; Tue, 23 Jul 2019 19:36:27 -0400 (EDT) Subject: Re: pg_dump schema in pg11 without global permissions To: Sergey Koposov Cc: "pgsql-general@lists.postgresql.org" 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> From: Adrian Klaver Message-ID: Date: Tue, 23 Jul 2019 16:36:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <1563923841.29206.106.camel@cmu.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 7/23/19 4:17 PM, Sergey Koposov wrote: > > For some reason I see when I just have > a command  like this it doesnt' have a grant connect on database > ~/soft/pgsql_install/bin/pg_dump -U skoposov -h localhost -n xx  --no-tablespaces test1 > but when I add  '-Fc' flag to pg_dump, I can see 'grant connect' inside the output (interdispersed with binary stuff) > > I don't get it As Tom explained the custom format will include a lot of information that you can retrieve later or not. For this case: https://www.postgresql.org/docs/11/app-pgdump.html "-C --create Begin the output with a command to create the database itself and reconnect to the created database. (With a script of this form, it doesn't matter which database in the destination installation you connect to before running the script.) If --clean is also specified, the script drops and recreates the target database before reconnecting to it. With --create, the output also includes the database's comment if any, and any configuration variable settings that are specific to this database, that is, any ALTER DATABASE ... SET ... and ALTER ROLE ... IN DATABASE ... SET ... commands that mention this database. Access privileges for the database itself are also dumped, unless --no-acl is specified. This option is only meaningful for the plain-text format. For the archive formats, you can specify the option when you call pg_restore. " NOTE the last paragraph. > >        S > >>> >>> >>> >>>         S >>> -- Adrian Klaver adrian.klaver@aklaver.com