Re: [HACKERS] pg_dump ignoring information_schema tables which usedin Create Publication. - Mailing list pgsql-hackers

From Kuntal Ghosh
Subject Re: [HACKERS] pg_dump ignoring information_schema tables which usedin Create Publication.
Date
Msg-id CAGz5QCJ1h9pmdzYkcQzEC80uzBamNRTFmX14Ngi_M8JC3xk8ag@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] pg_dump ignoring information_schema tables which usedin Create Publication.  (tushar <tushar.ahuja@enterprisedb.com>)
List pgsql-hackers
On Mon, May 22, 2017 at 5:22 PM, tushar <tushar.ahuja@enterprisedb.com> wrote:
> On 05/22/2017 05:12 PM, Kuntal Ghosh wrote:
>>
>> pg_dump ignores anything created under object name "pg_*" or
>> "information_schema".
>
> In this below scenario  , I am able to see - pg_dump catch the information
> of table which is created under information_schema
>
> --
> -- Name: e1; Type: VIEW; Schema: public; Owner: centos
> --
>
> CREATE VIEW e1 AS
>  SELECT abc.n
>    FROM information_schema.abc;
> ============================
>
The view is created in public schema. Hence, you're able to take a
dump for the same. However, you'll probably get an error saying
"relation information_schema.abc doesn't exist" while restoring the
dump.

For publications, the create definition(CREATE PUBLICATION) and
addition of tables(ALTER publication ADD TABLE) are separated. Hence,
it can skip all the relations created under information_schema or
anything under "pg_*" schema.

-- 
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: tushar
Date:
Subject: Re: [HACKERS] pg_dump ignoring information_schema tables which usedin Create Publication.
Next
From: Neha Khatri
Date:
Subject: [HACKERS] wal_level > WAL_LEVEL_LOGICAL