pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Jeevan Ladhe <jeevan.ladhe@enterprisedb.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: Wed, 10 May 2017 17:35:21 -0400
Message-ID: <14125.1494452121@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoazyEb9mdL3yJkWRHHtcOFBzZDE_ESgq8iE22gPpdML-w@mail.gmail.com>
References: <CAAJ_b94bXL28PqXACEZfWQA0qfmmKrjB3FDhgQOOzFDyYzDVtA@mail.gmail.com>
	<CAOgcT0N3JHJKcasd24_Zk-2rpf2Sk4LtTCVBgYoebPysTq-z8g@mail.gmail.com>
	<CA+TgmoazyEb9mdL3yJkWRHHtcOFBzZDE_ESgq8iE22gPpdML-w@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, May 9, 2017 at 4:21 AM, Jeevan Ladhe
> <jeevan.ladhe@enterprisedb.com> wrote:
>> Also, I can see similar issue exists with inheritance.

> That's a pretty insightful comment which makes me think that this
> isn't properly categorized as a bug.  Table partitioning is based on
> inheritance and is intended to behave like inheritance except when
> we've decided to make it behave otherwise.  We made no such decision
> in this case, so it behaves like inheritance in this case.  So, this
> is only a bug if the inheritance behavior is also a bug.

> And I think there's a pretty good argument that it isn't.

I agree.  There is room for a feature that would make --table or
--exclude-table on an inheritance parent apply to its children,
but that's a missing feature not a bug.  Also, if we did make that
happen automatically, for either inheritance or partitioning,
there would inevitably be people who need to turn it off.  ISTM that
the point of partitioning is mainly to be able to split up maintenance
work for a table that's too large to handle as an indivisible unit,
and it's hard to see why that wouldn't apply to dump/restore as much
as it does, say, vacuum.

So I think this can be classified as a feature to add later.

We should make sure that pg_dump behaves sanely when dumping just
some elements of a partition tree, of course.  And for that matter,
pg_restore ought to be able to successfully restore just some elements
out of a an archive containing more.

			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



view thread (19+ messages)  latest in thread

Message-ID: <14125.1494452121@sss.pgh.pa.us>
Permalink:  ../14125.1494452121@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14125.1494452121@sss.pgh.pa.us

 · 

reply

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, robertmhaas@gmail.com, jeevan.ladhe@enterprisedb.com, sulamul@gmail.com
  Subject: Re: Bug in pg_dump --table and --exclude-table for declarative partition table handling.
  In-Reply-To: <14125.1494452121@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