can't re-start postgresql - Mailing list pgsql-general

From mjbjr@beaudesign.com
Subject can't re-start postgresql
Date
Msg-id Pine.LNX.4.30.0105310026390.12112-100000@localhost.localdomain
Whole thread Raw
Responses [SOLVED] Re: can't re-start postgresql  (mjbjr@beaudesign.com)
Re: can't re-start postgresql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
I had a system, that was running postgres-7.1-1, lockup, and I had to
reboot.  Since the reboot, I can't get postgresql restarted.

As user 'postgres':

[postgres@localhost postgres]$ date
Thu May 31 00:40:09 PDT 2001

((current date))

[postgres@localhost postgres]$ echo $PGDATA
/var/lib/pgsql/data

((dat dir is set))

[ ... postgres]$ /usr/bin/postmaster > /tmp/postgres_logfile 2>&1 &
[1] 12117

[postgres@localhost postgres]$ ps aux | grep 12117
postgres 12119  0.0  0.1  1332  512 pts/5    S    00:34   0:00 grep 12117

((hmm, no pid))

[postgres@localhost postgres]$ cat /tmp/postgres_logfile
Found a pre-existing shared memory block (ID 4224672) still in use.
If you're sure there are no old backends still running,
remove the shared memory block with ipcrm(1), or just
delete "/var/lib/pgsql/data/postmaster.pid".

[postgres@localhost postgres]$ cat /var/lib/pgsql/data/postmaster.pid
15058
/var/lib/pgsql/data
  5432001   4224672

[postgres@localhost postgres]$ ps aux | grep 15058
postgres 12123  0.0  0.1  1332  512 pts/5    S    00:37   0:00 grep 15058

[postgres@localhost postgres]$ ls -l /var/lib/pgsql/data/postmaster.pid
-rw-------   1 postgres postgres       46 May 13 00:37
/var/lib/pgsql/data/postmaster.pid

(( ah, that postmaster.pid is from the last running postmaster: ))

[postgres@localhost postgres]$ ipcrm shm 4224672
shmctl : Identifier removed

((**appears** to have worked))

[postgres@localhost postgres]$ ps aux | grep 12130
postgres 12132  0.0  0.1  1332  512 pts/5    S    00:45   0:00 grep 12130

((but no))

[postgres@localhost postgres]$ ipcs -m 4224672

((returns a ton of addr info))


*******

Anyhow, the gist of it appears to be...

postmaster can't get restarted because of a shared mem problem, and that
while it appears to be removed ('ipcrm'), i get the same postgresql
startup error(s).  So it appears it is not being removed.

Any ideas on how to rectify the situation?

Thank you

--
                            - Martin J. Brown, Jr. -
                            - mjbjr@beaudesign.com -

    PGP Public Key ID: 0xCED9BD8A  Key Server: http://www.keyserver.net/en/


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Databases compared at zend.com
Next
From: Tom Lane
Date:
Subject: Re: Databases compared at zend.com