Re: Binary upgrade from <12 to 12 creates toast table forpartitioned tables - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Binary upgrade from <12 to 12 creates toast table forpartitioned tables
Date
Msg-id 20190311011141.hu6x6cyuavb5uhmx@alap3.anarazel.de
Whole thread Raw
In response to Re: Binary upgrade from <12 to 12 creates toast table forpartitioned tables  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 2019-03-10 13:29:06 -0300, Alvaro Herrera wrote:
> Hello
> 
> On 2019-Mar-08, Andres Freund wrote:
> 
> > > diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
> > > index e962ae7e913..1de8da59361 100644
> > > --- a/src/bin/pg_dump/pg_dump.c
> > > +++ b/src/bin/pg_dump/pg_dump.c
> > > @@ -4359,9 +4359,9 @@ binary_upgrade_set_type_oids_by_rel_oid(Archive *fout,
> > >                        "SELECT c.reltype AS crel, t.reltype AS trel "
> > >                        "FROM pg_catalog.pg_class c "
> > >                        "LEFT JOIN pg_catalog.pg_class t ON "
> > > -                      "  (c.reltoastrelid = t.oid) "
> > > +                      "  (c.reltoastrelid = t.oid AND c.relkind <> '%c') "
> > >                        "WHERE c.oid = '%u'::pg_catalog.oid;",
> > > -                      pg_rel_oid);
> > > +                      RELKIND_PARTITIONED_TABLE, pg_rel_oid);
> > 
> > Hm, I know this code isn't generally well documented, but perhaps we
> > could add a comment as to why we're excluding partitioned tables?
> 
> I added a short comment nearby.  Hopefully that's sufficient.  Let's see
> what the buildfarm members have to say now.

Thanks!  Looks like crake's doing better.

Greetings,

Andres Freund


pgsql-hackers by date:

Previous
From: "Imai, Yoshikazu"
Date:
Subject: RE: speeding up planning with partitions
Next
From: Masahiko Sawada
Date:
Subject: Re: Copy function for logical replication slots