Обсуждение: Fw: Problem regarding PostgreSQL

Поиск
Список
Период
Сортировка

Fw: Problem regarding PostgreSQL

От
Tatsuo Ishii
Дата:
Can someone comment on this?
Dear Tatsuo Ishii,

We have been trying to install PostgreSQL 6.5.3, that had come with Redhat 6.2. The installation of postgres 6.5.3 was
completed.The "initdb" comand executed succesfully. but during the "createdb" command it gives me error that"connection
todatabase 'template1' failed.   
connectDB() --connect() failed: connection refused.
Is the postmaster running at 'localhost' and accepting connections on unix socket 5432? createdb:database creation
failedon postgres." 

Please help for this situation at smps@enfinet.net or kalpan_vyas@yahoo.com.

Thanks
Kalpan



Re: Fw: Problem regarding PostgreSQL

От
"Len Morgan"
Дата:
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



Re: Fw: Problem regarding PostgreSQL

От
"John Clark L. Naldoza"
Дата:
----- Original Message -----
From: Tatsuo Ishii <t-ishii@sra.co.jp>
To: <pgsql-general@postgresql.org>
Sent: Wednesday, August 23, 2000 9:04 AM
Subject: [GENERAL] Fw: Problem regarding PostgreSQL


> Can someone comment on this?
>

Please check if your postmaster is actually running..;-)

Perhaps the command:

ps -aux | grep postgres

Would shed some light on the matter...

If there is no postgres daemon running...  Then please start one up..  Under
redhat this should be done by executing the following:

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

Hope that helps...


Cheers,


John Clark


Re: Fw: Problem starting PostgreSQL

От
Gilles DAROLD
Дата:
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,