Re: Binary upgrade from <12 to 12 creates toast table for partitioned tables

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Binary upgrade from <12 to 12 creates toast table for partitioned tables
Date: 2019-03-10 16:29:06
Message-ID: 20190310162906.GA18322@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

(I wondered about putting the comment between two lines of the string
literal, but decided against it ...)

Thanks!

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2019-03-10 16:39:42 Re: proposal: plpgsql pragma statement
Previous Message Dean Rasheed 2019-03-10 15:57:55 Re: [HACKERS] PATCH: multivariate histograms and MCV lists