Re: Postgresql database does not start and just hangs

Поиск
Список
Период
Сортировка
От SALUNKHE,MANDAR (HP-Singapore,ex1)
Тема Re: Postgresql database does not start and just hangs
Дата
Msg-id B2CFBDADA593FE4D9BD360111FB7F231068D4D77@xsg01.sgp.hp.com
обсуждение исходный текст
Ответ на Postgresql database does not start and just hangs  ("SALUNKHE,MANDAR (HP-Singapore,ex1)" <mandar.salunkhe@hp.com>)
Ответы Re: Postgresql database does not start and just hangs  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@ACACIA ~
$ cd /usr/local/pgsql/bin/

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

hp@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@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@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@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@ACACIA ~
$ cd /usr/local/pgsql/bin/

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

hp@ACACIA /usr/local/pgsql/bin
$ ./postmaster -i -D /usr/local/pgsql/data

The process still hangs.
Also when we check the status using
hp@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@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.salunkhe@hp.com

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

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

> And then

> hp@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

В списке pgsql-novice по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: What locale is my DB using?
Следующее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: What locale is my DB using?