Re: pg_dump is broken for partition tablespaces - Mailing list pgsql-hackers

From David Rowley
Subject Re: pg_dump is broken for partition tablespaces
Date
Msg-id CAKJS1f_iyBpAuYBPQv_GGeME=g9Rpr8yWjCaYV4E685yQ1uzkw@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump is broken for partition tablespaces  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Wed, 6 Mar 2019 at 20:19, Michael Paquier <michael@paquier.xyz> wrote:
>
> On Wed, Mar 06, 2019 at 07:45:06PM +1300, David Rowley wrote:
> > Can anyone see any fundamental reason that we should not create a
> > partitioned table by doing CREATE TABLE followed by ATTACH PARTITION?
> >  If not, I'll write a patch that fixes it that way.
>
> The part for partitioned indexes is already battle-proven, so if the
> part for partitioned tables can be consolidated the same way that
> would be really nice.

I think Andres is also going to need it to work this way for the
pluggable storage patch too.

Looking closer at this, I discovered that when pg_dump is in binary
upgrade mode that it crafts the pg_dump output in this way anyway...
Obviously, the column orders can't go changing magically in that case
since we're about to plug the old heap into the new table.  Due to the
removal of the special case, it means this patch turned out to remove
more code than it adds.

Patch attached.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Antonin Houska
Date:
Subject: openLogOff is not needed anymore
Next
From: David Rowley
Date:
Subject: Re: Inheriting table AMs for partitioned tables