Thread: initdb fails

initdb fails

From
"Cherry Ann Alib"
Date:
Good day to you...

I am currently having a problen initializing database in HPUX11.0.
When I try to run initdb this is the result

The files belonging to this database system will be owned by user "calib".
This user must also own the server process.

The database cluster will be initialized with locale ja_JP.eucJP.

fixing permissions on existing directory /home/calib/data... ok
creating directory /home/calib/data/base... ok
creating directory /home/calib/data/global... ok
creating directory /home/calib/data/pg_xlog... ok
creating directory /home/calib/data/pg_clog... ok
selecting default max_connections... 50
selecting default shared_buffers... 1000
creating configuration files... ok
creating template1 database in /home/calib/data/base/1... ERROR:  invalid
input syntax for type "oid": "select cast(($1 + $2) as timestamp with time
zone)"

initdb: failed

I'm really having a hard time on why this happens. I hope you can reply
regarding this issue.

Thank you very much.

Cherry Ann Alib
Software Design Engineer

Re: initdb fails

From
Tom Lane
Date:
"Cherry Ann Alib" <alib.ch@g6v.cnt.ncos.nec.co.jp> writes:
> I am currently having a problen initializing database in HPUX11.0.

> creating template1 database in /home/calib/data/base/1... ERROR:  invalid
> input syntax for type "oid": "select cast(($1 + $2) as timestamp with time
> zone)"

Hmm ... what Postgres version is this exactly?  How did you
build/install it?

The problem looks like the contents of the postgres.bki initialization
script are either wrong or being incorrectly interpreted by the
bootstrap loading code (specifically, I'm thinking that it's gotten off
by one column in the contents of pg_proc, so that a value meant for the
prosrc column is being put into an adjacent OID column).

IIRC we have seen cases in the past where postgres.bki got mangled by
buggy versions of "sed" or "awk", since we rely on those programs to
generate postgres.bki from the source files.  Not sure if that is your
problem here though.

            regards, tom lane