Re: PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error
Date
Msg-id 36DE9E6C.7DC3294D@alumni.caltech.edu
Whole thread Raw
In response to PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error  ("David R. Favor" <dfavor@gate.corridor.com>)
List pgsql-hackers
(back on-list, OK?)

> > > Problem Description:
> > > --------------------
> > > template1=> create database foo;
> > > CREATEDB
> > > template1=> drop database foo;
> > > ERROR:  typeidTypeRelid: Invalid type - oid = 0
> > > ERROR:  typeidTypeRelid: Invalid type - oid = 0
> > > template1=> \q
> > You have a damaged database afaik. Can you reproduce this with a 
> > newly installed (from initdb) database?
> This was done with a fresh database, meaning:
>    1) rm -rf /usr/local/pgsql/data
>    2) initdb -u postgres
>    3) postmaster -i &
>    4) psql -d template1
>    5) createdb foo;
>    6) drop database foo;   <--- error occurs here
> This is can be reproduced consistently. Every create/drop results in 
> the same error.
> Right now I'm recompiling everything with xlc 3.6.4 (latest native AIX 
> compiler). I should know in a bit whether the problem relates to gcc.
> One thing that I did have to do was #ifdef out the definitions of 
> int(8|16|32|64) as AIX 4.3.x already defines these. I've left in 
> -qhalt=w, to ensure that all warnings are cleaned up.

Well, that's a simple test case all right :)

Without knowing more, my guess is that it is AIX-specific, and specific
to your version and/or compiler. We have (had?) at least a few other
active developers on AIX, and afaik they are not seeing this on their
installations. I'll guess that they are not as current as you are on
versions of OS and compilers.

You say that AIX already defined int32, etc. Are those definitions
exactly compatible with those in the Postgres sources? If so, then
perhaps you can submit patches which do a conditional definition in the
Postgres code (e.g. #ifndef int32...).

Have you compiled with assert checking turned on? Have you compiled
without optimizations (-O0)? Do other operations on the database seem to
work, such as table creation or row insertion? I'll be interested in
seeing what you find when using gcc.

Regards.
                       - Tom


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Tom Lane's fixes in v6.4.3
Next
From: "David R. Favor"
Date:
Subject: Fixed! PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error