Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Bug in pg_dump --table and --exclude-table for declarative partition table handling.
Date
Msg-id 14125.1494452121@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: [HACKERS] Bug in pg_dump --table and --exclude-table fordeclarative partition table handling.
List pgsql-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



pgsql-hackers by date:

Previous
From: David Fetter
Date:
Subject: Re: [HACKERS] [Proposal] Allow users to specify multiple tables inVACUUM commands
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] [Proposal] Allow users to specify multiple tables in VACUUM commands