Re: [ADMIN] Problems with enums after pg_upgrade

From: Bernhard Schrader <bernhard(dot)schrader(at)innogames(dot)de>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [ADMIN] Problems with enums after pg_upgrade
Date: 2012-12-18 08:45:07
Message-ID: 50D02D13.3010004@innogames.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

On 12/18/2012 02:41 AM, Bruce Momjian wrote:
> On Mon, Dec 17, 2012 at 12:14:29PM +0100, Bernhard Schrader wrote:
>> Hello together,
>>
>> last thursday I upgraded one of our 9.0.6 postgresql servers to
>> 9.2.2 with pg_upgrade. So far everything seemed to work but we now
>> discover problems with the enum types. If we run one specific query
>> it breaks all time with such an error message:
>>
>> ERROR: invalid internal value for enum: 520251
>>
>> if this number should represent the enumtypid it is not existing
>> anymore in pg_enum.
>>
>> How could i solve this problem? should we regenerate all enums? or
>> what could we do?
>> Hopefully anyone has a clue, google doesn't seem to be the ressource
>> for this problem.
> We seriously tested the enum code so I am pretty confused why this is
> failing. If you do pg_dump --binary-upgrade --schema-only, do you see
> that a number like this being defined just before the enum is added?
>
Hi Bruce,

if i am dumping this db and grepping through the dump, i can't find the
number.
As far as we can see, the enum that is affected has now the enumtypid 16728.

is there a table which keeps the possible typecasts from enum to
text/text to enum etc.? if so, maybe the mapping in here is corrupt
since the upgrade.

regards

--
Bernhard Schrader
System Administration

InnoGames GmbH
Harburger Schloßstraße 28 (Channel 4) - 21079 Hamburg - Germany
Tel +49 40 7889335-53
Fax +49 40 7889335-22

Managing Directors: Hendrik Klindworth, Eike Klindworth, Michael Zillmer
VAT-ID: DE264068907 Amtsgericht Hamburg, HRB 108973

http://www.innogames.com – bernhard(dot)schrader(at)innogames(dot)de

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andrew Dunstan 2012-12-18 15:52:46 Re: [ADMIN] Problems with enums after pg_upgrade
Previous Message Shams Khan 2012-12-18 04:16:32 Re: PostgreSQL Performance Tuning / Postgresql.conf and on OS Level

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Korotkov 2012-12-18 08:45:27 Re: WIP: index support for regexp search
Previous Message Simon Riggs 2012-12-18 08:17:29 Re: Enabling Checksums