Re: Fw: Problem starting PostgreSQL - Mailing list pgsql-general

From Gilles DAROLD
Subject Re: Fw: Problem starting PostgreSQL
Date
Msg-id 39A384EE.62A83A9@darold.net
Whole thread Raw
In response to Re: Fw: Problem regarding PostgreSQL  ("Len Morgan" <len-morgan@crcom.net>)
List pgsql-general
Len Morgan wrote:

> I'm not sure the standard Red Hat install (or Postgres rpm) starts the
> server with the -i option.  He didn't mention whether they were on the same
> machine or not.
>
> Len Morgan

The standard Red Hat install include the -i option but it doesn't start
at all the first time.
Here is the default command line into the init script :

su -l postgres -c '/usr/bin/postmaster -i -S -D/var/lib/pgsql'

So you first have to run :

/etc/rc.d/init.d/postgresql start

It will run initdb, create the database architecture into /var/lib/pgsql/
and create the famous base template1...

After that you can run psql template1 without problems.

Here is what RH done :

[root@gdarold /root]# /etc/rc.d/init.d/postgresql start
Checking postgresql installation: no database files found.

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

Creating Postgres database system directory /var/lib/pgsql/base

Creating template database in /var/lib/pgsql/base/template1

Creating global classes in /var/lib/pgsql/base

Adding template1 database to pg_database...

Vacuuming template1
Creating public pg_user view
Creating view pg_rules
Creating view pg_views
Creating view pg_tables
Creating view pg_indexes
Loading pg_description
Starting postgresql service: postmaster [1078]
[root@gdarold /root]# su - postgres
bash$ psql template1

Then all works fine

Hope this help !

Regards,


pgsql-general by date:

Previous
From: Gilles DAROLD
Date:
Subject: Re: hidden data fields
Next
From: Roodie
Date:
Subject: some problems