Thread: PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error

PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error

From
"David R. Favor"
Date:
I've seen several postings about this, but no resolution. I've
filed another bug report.

If someone has a fix for this, let me know.

Thanks.

_______


============================================================================
                        POSTGRESQL BUG REPORT TEMPLATE
============================================================================


Your name               : David Favor
Your email address      : dfavor@corridor.com

Category                : runtime: back-end
Severity                : critical

Summary: destroydb fails with ERROR:  typeidTypeRelid: Invalid type - oid = 0

System Configuration
--------------------
  Operating System   : AIX 432

  PostgreSQL version : 6.4.2

  Compiler used      : gcc version egcs-2.93.08 19990214

Hardware:
---------
AIX aasc24 3 4 00FFFFFF4C00 (Power PC)

Versions of other tools:
------------------------
gmake - 3.77
bison - 1.25
flex  - 2.5.4

--------------------------------------------------------------------------

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


Re: [HACKERS] PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error

From
"Thomas G. Lockhart"
Date:
> I've seen several postings about this, but no resolution. I've
> filed another bug report.
> 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? If you can shrink down a test case to
something others can look at then we'd have a chance to try fixing it.
Otherwise, you will just need to work around it.

fwiw the "several postings" don't ring a bell (but I'm not on the
General list if that's where they appeared).

                       - Tom

Re: PostgreSQL 6.4.2 on AIX 4.3.2: typeidTypeRelid error

From
"Thomas G. Lockhart"
Date:
(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