A power failure led to failed postmaster restart using 7.4.6 (see output
below).  The short-term fix is usually to delete the pid file and restart.

I often wonder why ipcs never seems to show the shared memory 
block in question?  Am I using the wrong command?  Does the key
mentioned by pgsql map to the key in the ipcs output?  And if the 
shared segment is simply not there, would it be possible for pgsql to 
figure that out ala Apache, search the process table, and go ahead
and restart if it didn't see a postmaster already running?  I'm sure this 
has been asked and answered, I just couldn't find it via google...

TIA.

Ed

Database and process is pg746dba...

$ cat logs-pg746-7.4.6/server_log.Mon
pg_ctl: Another postmaster may be running.  Trying to start postmaster anyway.
2004-11-08 17:17:22.398 [18038] FATAL:  pre-existing shared memory block (key 
9746001, ID 658210829) is still in use
HINT:  If you're sure there are no old server processes still running, remove 
the shared memory block with the command "ipcrm", or just delete the file 
"/users/pg746dba/dbclusters/pg746/postgresql-7.4.6/data/postmaster.pid".
pg_ctl: cannot start postmaster
Examine the log output.

$ ipcs

------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status      
0x00000000 32768      ed        777        393216     2          dest         
0x00000000 131073     root      644        110592     4          dest         
0x00000000 3538946    ed        777        393216     2          dest         
0x00000000 3670019    ed        777        393216     2          dest         
0x00000000 4685828    ed        777        393216     2          dest         
0x00000000 4816901    ed        777        393216     2          dest         
0x00000000 4915206    ed        777        393216     2          dest         
0x00000000 4980743    ed        777        393216     2          dest         
0x00000000 5046280    ed        777        393216     2          dest         
0x00000000 5111817    ed        777        393216     2          dest         
0x00000000 5537802    root      644        110592     3          dest         
0x00000000 6651915    ed        777        393216     2          dest         
0x00000000 19595276   ed        666        14400      1          dest         
0x00000000 11272205   root      644        110592     2          dest         

------ Semaphore Arrays --------
key        semid      owner      perms      nsems     

------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages    



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to