Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Greg Stark <stark(at)mit(dot)edu>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Evan D(dot) Hoffman" <evandhoffman(at)gmail(dot)com>, Igor Neyman <ineyman(at)perceptron(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4
Date: 2013-05-09 22:19:31
Message-ID: 20130509221931.GF24521@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

On Thu, May 9, 2013 at 06:05:14PM -0400, Alvaro Herrera wrote:
> Greg Stark escribió:
> > On Thu, May 9, 2013 at 10:11 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > > In any case, it seems like pg_upgrade ought to have a strategy for
> > > dealing with tables acquiring toast tables like this,
> >
> > Acquiring toast tables seems pretty trivial to deal with. *Losing* a
> > toast table might be a bit more involved...
>
> pg_upgrade already deals with the new code deciding not to create a
> toast table (by forcing it to do so anyway in binary upgrade mode).

Yes, a good point I had forgotten. postgres --binary-upgrade mode can
force the toast table to be created to match the old cluster; see
toasting.c::create_toast_table():

/*
* Check to see whether the table actually needs a TOAST table.
*
* If an update-in-place toast relfilenode is specified, force toast file
* creation even if it seems not to need one.
*/
if (!needs_toast_table(rel) &&
(!IsBinaryUpgrade ||
!OidIsValid(binary_upgrade_next_toast_pg_class_oid)))
return false;

> It's only the other case that's problematic -- but then AFAICS fixing
> that is just a SMOP.

Yes, it is this opposite case where the _new_ cluster wants a TOAST
table that the old cluster doesn't have, which is what Evan is
reporting.

Evan, have you adjusted the TOAST storage parameters for this table at
all, via ALTER TABLE SET STORAGE?

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

--
Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Momjian 2013-05-09 23:25:59 Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4
Previous Message Alvaro Herrera 2013-05-09 22:05:14 Re: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2013-05-09 22:53:41 Re: corrupt pages detected by enabling checksums
Previous Message Jeff Davis 2013-05-09 22:18:47 Re: corrupt pages detected by enabling checksums