From: Guo, Yun <YGuo@cvent.com>
To: Albe Laurenz <laurenz.albe@wien.gv.at>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: pg_dump not dumping some schemas
Date: Fri, 29 May 2015 13:23:42 +0000
Message-ID: <D18DE04B.36C72%yguo@cvent.com> (raw)
In-Reply-To: <A737B7A37273E048B164557ADEF4A58B36617951@ntex2010i.host.magwien.gv.at>
References: <D18CC6E9.36A0E%yguo@cvent.com>
<A737B7A37273E048B164557ADEF4A58B36617951@ntex2010i.host.magwien.gv.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
I tried again. It¹s 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" <laurenz.albe@wien.gv.at> wrote:
>Yun Guo wrote:
>> I use this command to dump schema:
>> pg_dump -s -n test polling_etl > file.sql
>>
>> 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¹s missing
>> some permissions, but not able to figure out what permissions are
>>missing. Below is the permission on
>> test schema:
>>
>> polling_etl=# \dn+ test
>> List of schemas
>> Name | Owner | Access privileges | Description
>> ------+-------+-------------------+-------------
>> test | test | test=UC/test +|
>> | | pb_writer=UC/test+|
>> | | =U/test +|
>> | | postgres=U*C/test |
>>
>
>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
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: YGuo@cvent.com, laurenz.albe@wien.gv.at
Subject: Re: pg_dump not dumping some schemas
In-Reply-To: <D18DE04B.36C72%yguo@cvent.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox