Re: How to check whether PostgreSQL server is up and running?

From: Jan Muhammad <janmuhd(at)yahoo(dot)com>
To: dayat <sql(dot)muda(at)yahoo(dot)co(dot)id>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: How to check whether PostgreSQL server is up and running?
Date: 2009-05-08 17:28:31
Message-ID: 838278.12589.qm@web38702.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,

Got it working now, though after several searches and hit-n-trials....

The problem was in my "/pgsql/data/pg_hba.conf"; where it needed my machine's IP.
Now got it working.

But the real issue of service is not yet being recognized  with in the command:
# service postgresql status
postgresql: unrecognized service
Or even:
#service pg_ctl status
pg_ctl: unrecognized service

And strange is  when I do:
# /sbin/service --status-all
I can see among other service (pg_ctl) running:
pg_ctl: server is running (PID: 29330)
/usr/local/pgsql/bin/postgres "-i" "-D" "/usr/local/pgsql/data"

Don't know what is/was issue; but anyways Thanks for helping.

Regards

-Jan Muhammad

--- On Fri, 5/8/09, dayat <sql(dot)muda(at)yahoo(dot)co(dot)id> wrote:

From: dayat <sql(dot)muda(at)yahoo(dot)co(dot)id>
Subject: Re: [ADMIN] How to check whether PostgreSQL server is up and running?
To: pgsql-admin(at)postgresql(dot)org
Date: Friday, May 8, 2009, 9:42 PM


Ok let's to create a cluster for you, be sure the
pg8 directory owned by postgres user and the directory is empty.
 
[postgres(at)callisto]$ initdb -D /usr/local/pgsql/postgresql-8.3.7/pg8 -U postgres
-W
 
Type your password if they ask, wait initdb process
until finish.
 
And try the server:
[postgres(at)callisto]$ pg_ctl -D /usr/local/pgsql/postgresql-8.3.7/pg8
start
 
enter to database postgres with user postgres and type your password
[postgres(at)callisto]$ psql postgres postgres
-W
 
Tell me if this not work.
 
Regards
Hidayat
 
----- Original Message -----
From: Jan Muhammad
To: pgsql-admin(at)postgresql(dot)org
Sent: Friday, May 08, 2009 4:11 PM
Subject: [ADMIN] How to check whether PostgreSQL server is up and
running?



Hi,

After having various error message in starting
PostgreSQL version 8.2.11; finally uninstalled/deleted it. Now trying my
luck on  8.3.7, but things haven't changed for me.
When I try to
check that postmaster server is running or not? I get the following
error:
$ postmaster -D
/usr/local/pgsql/data
LOG:  could not translate host name
"localhost", service "5432" to address: Name or service not
known
WARNING:  could not create listen socket for
"localhost"
FATAL:  could not create any TCP/IP
sockets
.......................................................................
Similarly
when I try to start postgres server with
[postgres(at)callisto
postgresql-8.3.7]$ pg_ctl -D pg8
start
postgres cannot access the server configuration file
"/usr/local/pgsql/postgresql-8.3.7/pg8/postgresql.conf": No such file or
directory
server starting

Have no idea what's wrong and where
the problem is? Do I need to change/edit some of Environment variable
settings or what? Or should I reinstall PostgreSQL with Yum?? Or should
give up using PostgreSQL and switch to some other DB like MySQL etc... No
idea what to do.....?

Thanks in advance for help.

-Jan
Muhammad

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kasia Tuszynska 2009-05-08 20:25:06 testing 8.4
Previous Message dayat 2009-05-08 16:42:46 Re: How to check whether PostgreSQL server is up and running?