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

From: "Evan D(dot) Hoffman" <evandhoffman(at)gmail(dot)com>
To: Igor Neyman <ineyman(at)perceptron(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4
Date: 2013-05-08 20:21:34
Message-ID: CABRB-LssLgy2dP3e=oPtF_DjHZ9FGczBBcJffxpw3Yd=eRg_3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

Well, each time it fails it refers to the file
"/var/lib/pgsql/9.1/data/base/16406/3016054", but that's not the file
associated with OID 2938685.

Here's the output of that query:

db=# Select relname from pg_class where relfilenode = 3016054::oid;
relname
---------
(0 rows)

db=#

On Wed, May 8, 2013 at 4:12 PM, Igor Neyman <ineyman(at)perceptron(dot)com> wrote:
>
>
>> -----Original Message-----
>> From: Evan D. Hoffman [mailto:evandhoffman(at)gmail(dot)com]
>> Sent: Wednesday, May 08, 2013 3:35 PM
>> To: Igor Neyman
>> Subject: Re: [GENERAL] pg_upgrade fails, "mismatch of relation OID" -
>> 9.1.9 to 9.2.4
>>
>> Looks like it IS the same OID every time, referencing an index. I
>> already reindexed the entire DB in case it was some problem with a
>> corrupt index. Here's the index info, if it's of any use.
>>
>>
>> Interestingly, if I query which that relation's in, it's not the one
>> that it complained about:
>>
>> db=# select pg_relation_filepath(2938685); pg_relation_filepath
>> ----------------------
>> base/16407/21446253
>> (1 row)
>>
>> db=#
>>
>> (The file referenced in the error was
>> /var/lib/pgsql/9.1/data/base/16406/3016054)
>>
>> On Wed, May 8, 2013 at 2:35 PM, Igor Neyman <ineyman(at)perceptron(dot)com>
>> wrote:
>> >
>> >> -----Original Message-----
>> >> From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-
>> >> owner(at)postgresql(dot)org] On Behalf Of Evan D. Hoffman
>> >> Sent: Wednesday, May 08, 2013 2:27 PM
>> >> To: Postgresql Mailing List
>> >> Subject: [GENERAL] pg_upgrade fails, "mismatch of relation OID" -
>> >> 9.1.9 to 9.2.4
>> >>
>> >>
>> >> Linking user relation files
>> >> /var/lib/pgsql/9.1/data/base/16406/3016054
>> >> Mismatch of relation OID in database "dbname": old OID 2938685, new
>> >> OID
>> >> 299721 Failure, exiting
>> >>
>> >>
>> >
>> > Is it always the same file, same OIDs (old/new)?
>> > If it's the same file, did you try to find out what relation it
>> belongs to?
>> >
>> > Igor Neyman
>> >
>
> Is it the same file though?
> And, if it is what do you get when you run:
>
> Select relname from pg_class where relfilenode = 3016054::oid;
>
> Please, reply to the list ("reply to all"), so that other people who may have better ideas/solutions for could see it.
>
> Igor Neyman

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2013-05-08 20:25:49 Re: Trigger function on Warm Standby
Previous Message Igor Neyman 2013-05-08 20:12:12 Re: pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-05-08 20:30:26 Re: pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4
Previous Message Igor Neyman 2013-05-08 20:12:12 Re: pg_upgrade fails, "mismatch of relation OID" - 9.1.9 to 9.2.4