Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YyKGM-0006W5-72 for pgsql-admin@arkaria.postgresql.org; Fri, 29 May 2015 13:23:50 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YyKGL-0002HC-Fu for pgsql-admin@arkaria.postgresql.org; Fri, 29 May 2015 13:23:49 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YyKGK-0002H6-5O for pgsql-admin@postgresql.org; Fri, 29 May 2015 13:23:48 +0000 Received: from smtp1.cvent.com ([198.207.146.196]) by makus.postgresql.org with esmtps (TLS1.0:DHE_RSA_CAMELLIA_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1YyKGG-0005AH-Kp for pgsql-admin@postgresql.org; Fri, 29 May 2015 13:23:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cvent.com; i=@cvent.com; q=dns/txt; s=c1211; t=1432905824; x=1464441824; h=from:to:subject:date:message-id:references:in-reply-to: content-id:content-transfer-encoding:mime-version; bh=P20CyltEuRt5mtHXyXlSKwieQFMli8PAgT2YXTC1trg=; b=UzzkEgMttcj42pkt0cMzCdWQ7LrPd9fjOrxiocgph3XV3IORWrXGQjzx WbXAilgxp/asKclb6eIoZoYefuCTPEcVYJVqRSt7wYPWI4yRHIm6IURaV Z4BsB1ZkN5OUPxoGyLsonXwC08d4MgAcSbHtZ1QgOhBmwn7tjaRkQLfEt Y=; X-IronPort-AV: E=Sophos;i="5.13,517,1427774400"; d="scan'208";a="45944710" From: "Guo, Yun" To: Albe Laurenz , "pgsql-admin@postgresql.org" Subject: Re: pg_dump not dumping some schemas Thread-Topic: pg_dump not dumping some schemas Thread-Index: AQHQmWrG8qD1Kd5wwECxQFQUQc4hUJ2SmSMwgABZZgA= Date: Fri, 29 May 2015 13:23:42 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.5.0.150423 Content-Type: text/plain; charset="iso-8859-1" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org I tried again. It=B9s still not dumping CREATE SCHEMA. And weirdly it would work for some other schemas in the same database. -bash-4.1$ pg_dump -s -n test polling_etl | grep 'CREATE SCHEMA' -bash-4.1$ pg_dump -s -n test2 polling_etl | grep 'CREATE SCHEMA' CREATE SCHEMA test2; On 5/29/15, 4:06 AM, "Albe Laurenz" wrote: >Yun Guo wrote: >> I use this command to dump schema: >> pg_dump -s -n test polling_etl > file.sql >>=20 >> However, the file.sql file includes creation of all the objects in >>schema test, but not the creation >> of test schema itself. >> I executed pg_dump as postgres user, the server and pg_dump are version >>9.3.5. I suspect it=B9s missing >> some permissions, but not able to figure out what permissions are >>missing. Below is the permission on >> test schema: >>=20 >> polling_etl=3D# \dn+ test >> List of schemas >> Name | Owner | Access privileges | Description >> ------+-------+-------------------+------------- >> test | test | test=3DUC/test +| >> | | pb_writer=3DUC/test+| >> | | =3DU/test +| >> | | postgres=3DU*C/test | >>=20 > >It works on my 9.3.6 database: > >$ pg_dump -p 1235 -s -n laurenz test|grep 'CREATE SCHEMA' >CREATE SCHEMA laurenz; > >You don't need any permissions to dump a schema, everybody can read the >information. > >Could you double check with a "grep" or so that there is indeed no CREATE >SCHEMA >in your dump? > >Yours, >Laurenz Albe --=20 Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin