Thread: Error running 'initdb'

Error running 'initdb'

From
"Jason Farnsworth"
Date:
I've been spending the last couple of days trying to upgrade lots of stuff
from the standard linux disto programs.  Postgres is not making this easy on
me.  I've followed the INSTALL file instructions verbatim and all is good
until section 19 of the install doc.  It instructs to run the 'initdb'
command.  When I do this I get the following error:

==============================================
[postgres@orion pgsql]$ initdb
initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to
create the template database.
initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the
global classes.
initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based
authentication control file.

We are initializing the database system with username postgres (uid=531).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /usr/local/pgsql/data

Creating Postgres database system directory /usr/local/pgsql/data/base

initdb: creating template database in /usr/local/pgsql/data/base/template1
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1
        syntax error 2305 : parse error
Creating global classes in /base
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1

Adding template1 database to pg_database...
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1 <
/tmp/create.20108
ERROR:  pg_atoi: error in "template1": can't parse "template1"
ERROR:  pg_atoi: error in "template1": can't parse "template1"
initdb: could not log template database
initdb: cleaning up.
[postgres@orion pgsql]$
===============================================

The /usr/local/pgsql/data directory is never created, no database is made,
and I get a core file.

I really need to get this working, any ideas?  Thanks =)
________________________________
Northstar Digital Media Inc.
Jason Farnsworth
jason@nsdigital.com


RE: [GENERAL] Error running 'initdb'

From
"Frans de Wet"
Date:
Make sure you have ONLY ONE VERSION (the correct version) of  initdb,
postmaster, and psql and so on in your path ... if you had the postgresql
rpm installed and then upgraded from the tgz files you can run into problems
like this ... although ... I am not 100% sure that it is the exact same
problem I had ... just a hint ;-)  I had the postgres binaries in /usr/bin
and in /usr/local/pgsql/bin and the postmaster from /usr/local/pgsql/bin was
running with the older binaries in the path trying to access it correctly.
No luck till I removed the RPM.

Frans

-----Original Message-----
From:    owner-pgsql-general@postgreSQL.org
[mailto:owner-pgsql-general@postgreSQL.org] On Behalf Of Jason Farnsworth
Sent:    Wednesday, March 24, 1999 03:10
To:    pgsql-general@postgreSQL.org
Subject:    [GENERAL] Error running 'initdb'

I've been spending the last couple of days trying to upgrade lots of stuff
from the standard linux disto programs.  Postgres is not making this easy on
me.  I've followed the INSTALL file instructions verbatim and all is good
until section 19 of the install doc.  It instructs to run the 'initdb'
command.  When I do this I get the following error:

==============================================
[postgres@orion pgsql]$ initdb
initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to
create the template database.
initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the
global classes.
initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based
authentication control file.

We are initializing the database system with username postgres (uid=531).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /usr/local/pgsql/data

Creating Postgres database system directory /usr/local/pgsql/data/base

initdb: creating template database in /usr/local/pgsql/data/base/template1
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1
        syntax error 2305 : parse error
Creating global classes in /base
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1

Adding template1 database to pg_database...
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1 <
/tmp/create.20108
ERROR:  pg_atoi: error in "template1": can't parse "template1"
ERROR:  pg_atoi: error in "template1": can't parse "template1"
initdb: could not log template database
initdb: cleaning up.
[postgres@orion pgsql]$
===============================================

The /usr/local/pgsql/data directory is never created, no database is made,
and I get a core file.

I really need to get this working, any ideas?  Thanks =)
________________________________
Northstar Digital Media Inc.
Jason Farnsworth
jason@nsdigital.com



RE: [GENERAL] Error running 'initdb'

From
"Frans de Wet"
Date:
If you could not read the previous email ... just send me a note ... I HAD
to upgrade to IE5 ... at work :-(  Mirosloth and it changed all my settings
like IT wanted


In short ... try checking if you have only ONE VERSION of the postgres
binaries ANYWHERE in yout directory structure ... especially go check in
/usr/bin for postmaster and initdb and all those files ;-)  The rpm of
Redhat installs it there  ...

Frans

-----Original Message-----
From: owner-pgsql-general@postgreSQL.org
[mailto:owner-pgsql-general@postgreSQL.org]On Behalf Of Jason Farnsworth
Sent: Wednesday, March 24, 1999 03:10
To: pgsql-general@postgreSQL.org
Subject: [GENERAL] Error running 'initdb'


I've been spending the last couple of days trying to upgrade lots of stuff
from the standard linux disto programs.  Postgres is not making this easy on
me.  I've followed the INSTALL file instructions verbatim and all is good
until section 19 of the install doc.  It instructs to run the 'initdb'
command.  When I do this I get the following error:

==============================================
[postgres@orion pgsql]$ initdb
initdb: using /usr/local/pgsql/lib/local1_template1.bki.source as input to
create the template database.
initdb: using /usr/local/pgsql/lib/global1.bki.source as input to create the
global classes.
initdb: using /usr/local/pgsql/lib/pg_hba.conf.sample as the host-based
authentication control file.

We are initializing the database system with username postgres (uid=531).
This user will own all the files and must also own the server process.

Creating Postgres database system directory /usr/local/pgsql/data

Creating Postgres database system directory /usr/local/pgsql/data/base

initdb: creating template database in /usr/local/pgsql/data/base/template1
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1
        syntax error 2305 : parse error
Creating global classes in /base
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1

Adding template1 database to pg_database...
Running: postgres -boot -C -F -D/usr/local/pgsql/data -Q template1 <
/tmp/create.20108
ERROR:  pg_atoi: error in "template1": can't parse "template1"
ERROR:  pg_atoi: error in "template1": can't parse "template1"
initdb: could not log template database
initdb: cleaning up.
[postgres@orion pgsql]$
===============================================

The /usr/local/pgsql/data directory is never created, no database is made,
and I get a core file.

I really need to get this working, any ideas?  Thanks =)
________________________________
Northstar Digital Media Inc.
Jason Farnsworth
jason@nsdigital.com



Re: [GENERAL] Error running 'initdb'

From
"Jason Farnsworth"
Date:
Yup, that worked perfect.  Just RPM -e'd those old Potgres guys out of there
and it all works great now =)  Thanks!

This should PROBABLY be added to the bottom of the INSTALL doc with the OS
notes (under linux remove RPM packages of postgres first)
________________________________
Northstar Digital Media Inc.
Jason Farnsworth
jason@nsdigital.com
----- Original Message -----
From: Frans de Wet <Frans@Playful.com>
To: Jason Farnsworth <jason@nsdigital.com>; <pgsql-general@postgreSQL.org>
Sent: Tuesday, March 23, 1999 5:19 PM
Subject: RE: [GENERAL] Error running 'initdb'


> Make sure you have ONLY ONE VERSION (the correct version) of  initdb,
> postmaster, and psql and so on in your path ... if you had the postgresql
> rpm installed and then upgraded from the tgz files you can run into
problems
> like this ... although ... I am not 100% sure that it is the exact same
> problem I had ... just a hint ;-)  I had the postgres binaries in /usr/bin
> and in /usr/local/pgsql/bin and the postmaster from /usr/local/pgsql/bin
was
> running with the older binaries in the path trying to access it correctly.
> No luck till I removed the RPM.
>
> Frans
>
> -----Original Message-----
> From: owner-pgsql-general@postgreSQL.org
> [mailto:owner-pgsql-general@postgreSQL.org] On Behalf Of Jason Farnsworth
> Sent: Wednesday, March 24, 1999 03:10
> To: pgsql-general@postgreSQL.org
> Subject: [GENERAL] Error running 'initdb'
>
> I've been spending the last couple of days trying to upgrade lots of stuff
> from the standard linux disto programs.  Postgres is not making this easy
on
> me.  I've followed the INSTALL file instructions verbatim and all is good
> until section 19 of the install doc.  It instructs to run the 'initdb'
> command.  When I do this I get the following error