Re: Postgresql database does not start and just hangs

From: "SALUNKHE,MANDAR (HP-Singapore,ex1)" <mandar(dot)salunkhe(at)hp(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Postgresql database does not start and just hangs
Date: 2003-04-21 02:14:56
Message-ID: B2CFBDADA593FE4D9BD360111FB7F231068D4D77@xsg01.sgp.hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Dear Tom,
Now maybe we have some solution here.
Do you mean to say that if we reinstall postgresql but keep the same data
directory as in the previous install, the database will start again? If yes,
we could try that out.
And I have shown by copy/pasting from two sessions as explained below.

The sessions are as follows:

1st session:
----------------------------------------------------------------
hp(at)ACACIA ~
$ cd /usr/local/pgsql/bin/

hp(at)ACACIA /usr/local/pgsql/bin
$ ipc-daemon &
[1] 18140

hp(at)ACACIA /usr/local/pgsql/bin
$ ./postmaster -i -D /usr/local/pgsql/data

And the process hangs there.

When we check the status of Postgresql using

hp(at)ACACIA ~
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data status
pg_ctl: postmaster is running (pid: 18012)
Command line was:
/usr/local/pgsql/bin/./postmaster '-i' '-D' '/usr/local/pgsql/data'

The data directory shows:
hp(at)ACACIA /usr/local/pgsql/data
$ ls -lrt
total 28
-rw-r--r-- 1 hp None 5 Mar 13 03:09 PG_VERSION
drwxr-xr-x 2 hp None 0 Mar 13 03:09 pg_clog
-rw-r--r-- 1 hp None 4027 Mar 13 03:09 postgresql.conf
-rw-r--r-- 1 hp None 1285 Mar 13 03:09 pg_ident.conf
-rw-r--r-- 1 hp None 10313 Mar 13 03:18 pg_hba.conf
drwxr-xr-x 5 hp None 0 Apr 5 17:00 base
-rw-r--r-- 1 hp None 69 Apr 7 23:17 postmaster.opts
drwxr-xr-x 2 hp None 4096 Apr 9 01:06 pg_xlog
drwxr-xr-x 2 hp None 4096 Apr 15 09:49 global
-rw-r--r-- 1 hp None 30 Apr 17 20:50 postmaster.pid

So the postmaster.pid file is present. When we remove the pid file, even
then,

hp(at)ACACIA ~
$ /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data status
pg_ctl: postmaster or postgres is not running

2nd session: Did this to check after removing pid file.
----------------------------------------------------------------

hp(at)ACACIA ~
$ cd /usr/local/pgsql/bin/

hp(at)ACACIA /usr/local/pgsql/bin
$ ipc-daemon &
[1] 18080

hp(at)ACACIA /usr/local/pgsql/bin
$ ./postmaster -i -D /usr/local/pgsql/data

The process still hangs.
Also when we check the status using
hp(at)ACACIA ~
$ /usr/local/pgsql/bin/psql SGDB

This command hangs too.

Viewing the pid file ( newly created ) shows:
18140
/usr/local/pgsql/data

And then

hp(at)ACACIA /usr/local/pgsql/data
$ ps -aef|grep 18140
hp 18140 18204 con 21:19:40 /usr/bin/ps

Thanks

Mandar Salunkhe
460 Alexandra Road, PSA Building
Singapore 119963
Phone: 65-63617413 HP Telnet Number: 831-7413
Email: mandar(dot)salunkhe(at)hp(dot)com

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us <mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us> ]
Sent: Monday, April 21, 2003 10:00 AM
To: SALUNKHE,MANDAR (HP-Singapore,ex1)
Cc: 'pgsql-novice(at)postgresql(dot)org'
Subject: Re: [NOVICE] Postgresql database does not start and just hangs

"SALUNKHE,MANDAR (HP-Singapore,ex1)" <mandar(dot)salunkhe(at)hp(dot)com> writes:
> Viewing the pid file ( newly created ) shows:
> 18140
> /usr/local/pgsql/data

> And then

> hp(at)ACACIA /usr/local/pgsql/data
> $ ps -aef|grep 18140
> hp 18140 18204 con 21:19:40 /usr/bin/ps

I'm not familiar with how Cygwin assigns process PIDs, but the above sure
looks like the ps process has been given the same PID that the postmaster
thought it had. Are you copying-and-pasting from more than one test
session? If not, there's something odd here.

Perhaps it'd be worth your while to reinstall Cygwin --- I wonder if the
Cygwin executables could have gotten corrupted in your crash. (While you're
at it you might as well reinstall ipc-daemon and Postgres too. Just be sure
not to munge your data directory ...)

regards, tom lane

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Jean-Christian Imbeault 2003-04-21 02:30:53 Re: What locale is my DB using?
Previous Message Jean-Christian Imbeault 2003-04-21 02:14:18 Re: What locale is my DB using?