From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Cc: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: amul sul <sulamul@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: Bug in pg_dump --table and --exclude-table for declarative partition table handling.
Date: Thu, 11 May 2017 09:02:42 -0400
Message-ID: <31399.1494507762@sss.pgh.pa.us> (raw)
In-Reply-To: <CAOgcT0PPxRsHMMhB0cZY=fC=O9y69tptH5PioHx64DPc9t14zA@mail.gmail.com>
References: <CAAJ_b94bXL28PqXACEZfWQA0qfmmKrjB3FDhgQOOzFDyYzDVtA@mail.gmail.com>
<CAOgcT0N3JHJKcasd24_Zk-2rpf2Sk4LtTCVBgYoebPysTq-z8g@mail.gmail.com>
<CA+TgmoazyEb9mdL3yJkWRHHtcOFBzZDE_ESgq8iE22gPpdML-w@mail.gmail.com>
<14125.1494452121@sss.pgh.pa.us>
<CAFjFpRcVZX7ABrvQ0esbUg2KxyQaASc8HokjNGeg6Sk7boP8iA@mail.gmail.com>
<CAOgcT0PPxRsHMMhB0cZY=fC=O9y69tptH5PioHx64DPc9t14zA@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Jeevan Ladhe <jeevan.ladhe@enterprisedb.com> writes:
> On Thu, May 11, 2017 at 4:47 PM, Ashutosh Bapat <
>> We add PARTITION OF clause for a table which is partition, so if the
>> parent is not present while restoring, the restore is going to fail.
> +1
> But, similarly for inheritance if we dump a child table, it's dump is
> broken as
> of today. When we dump a child table we append "inherits(parenttab)" clause
> at
> the end of the DDL. Later when we try to restore this table on a database
> not
> having the parenttab, the restore fails.
> So, I consider this as a bug.
It sounds exactly what I'd expect. In particular, given that pg_dump has
worked that way for inherited tables from the beginning, it's hard to see
any must-fix bugs here.
You could argue that it would be better for pg_dump to emit something
like
CREATE TABLE c (...);
ALTER TABLE c INHERIT p;
so that if p isn't around, at least c gets created. And I think it
*would* be better, probably. But if that isn't a new feature then
I don't know what is. And partitioning really ought to track the
behavior of inheritance here.
regards, tom lane
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
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-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, jeevan.ladhe@enterprisedb.com, ashutosh.bapat@enterprisedb.com, robertmhaas@gmail.com, sulamul@gmail.com
Subject: Re: Bug in pg_dump --table and --exclude-table for declarative partition table handling.
In-Reply-To: <31399.1494507762@sss.pgh.pa.us>
* 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