Re: pg_dump ignoring information_schema tables which used in Create Publication.

From: Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump ignoring information_schema tables which used in Create Publication.
Date: 2017-05-22 12:34:07
Message-ID: CAGz5QCJ1h9pmdzYkcQzEC80uzBamNRTFmX14Ngi_M8JC3xk8ag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 22, 2017 at 5:22 PM, tushar <tushar(dot)ahuja(at)enterprisedb(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Neha Khatri 2017-05-22 13:08:56 wal_level > WAL_LEVEL_LOGICAL
Previous Message tushar 2017-05-22 12:26:22 Re: pg_dump ignoring information_schema tables which used in Create Publication.