On Sunday 24 September 2006 09:17 am, Tom Lane wrote: > Jon Lapham <lapham@xxxxxxxxx> writes: > > I recently had another electrical power outage that left my machine > > unable to restart postgresql. I had previously reported this a while > > ago: > > > > http://archives.postgresql.org/pgsql-general/2005-04/msg01286.php > > > > Anyway, because I have seen this problem before, I knew exactly what the > > solution to the problem was (delete the postmaster.pid file), > > As was pointed out to you in the discussion subsequent to that message, > this is not a good automatic response, and it should not be necessary at > all with a post-8.0 postmaster. > > > FATAL: pre-existing shared memory block (key 5432001, ID 65536) is > > still in use > > This is extremely odd, because a shared memory block could not possibly > have survived a reboot. Too bad you have destroyed the evidence, > because I would like to know what really happened there. Is it possible > that you have somehow managed to try to start the postmaster twice > during your system boot cycle? If you do have two postmasters running > in that data directory right now, you are in deep trouble :-( > <Snip> > > regards, tom lane > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster In the its a small world department I experienced the same problem shortly after reading this message. The particulars Postgres 8.1.4, Kubuntu 6.06 on a laptop. My laptop sometimes experiences issues with ACPI and has to be powered off. After the most recent event I saw a message similar to that reported above. I checked and there were no other Postgres instances running. What information I could collect is included in the attached file. -- Adrian Klaver aklaver@xxxxxxxxxxx
Error message at Postgres start up-- pg_ctl start pg_ctl: another postmaster may be running; trying to start postmaster anyway -2006-09-24 17:16:59.986 PDT-FATAL: pre-existing shared memory block (key 5432001, ID 917506) is still in use -2006-09-24 17:16:59.987 PDT-HINT: If you're sure there are no old server processes still running, remove the shared memory block with the command "ipcclean", "ipcrm", or just delete the file "postmaster.pid". pg_ctl: could not start postmaster Examine the log output. The postmaster.pid from the previous session(before reboot)-- postmaster.pid 6173 /usr/local/pgsql/data 5432001 917506 Postgres log after I deleted above postmaster.pid and ran pg_ctl again.-- ~ -2006-09-24 17:21:40.693 PDT-LOG: database system was interrupted at 2006-09-24 14:57:34 PDT -2006-09-24 17:21:40.716 PDT-LOG: checkpoint record is at 0/59AD3D8 -2006-09-24 17:21:40.716 PDT-LOG: redo record is at 0/59AD3D8; undo record is at 0/0; shutdown FALSE -2006-09-24 17:21:40.716 PDT-LOG: next transaction ID: 32898; next OID: 456080 -2006-09-24 17:21:40.716 PDT-LOG: next MultiXactId: 1; next MultiXactOffset: 0 -2006-09-24 17:21:40.716 PDT-LOG: database system was not properly shut down; automatic recovery in progress -2006-09-24 17:21:40.728 PDT-LOG: record with zero length at 0/59AD41C -2006-09-24 17:21:40.728 PDT-LOG: redo is not required -2006-09-24 17:21:40.765 PDT-LOG: database system is ready -2006-09-24 17:21:40.811 PDT-LOG: transaction ID wrap limit is 2147484146, limited by database "postgres"