The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

postmaster service won't start postgresql

I have postgresql (cygwin install) on W2K server. It's a test server and I didn't have battery backup. Over the weekend we had a power failure. And of course now, (since it was shut down dirty) the postmaster service won't start. Does anyone have any ideas?

This problem has hunted me since I started using Postgres on Windows. That is, assuming it's the same problem;
Check in your log files for something like this:

Code:

FATAL: pre-existing shared memory block (key 5432001, ID 0) 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 "/usr/share/postgresql/data/postmaster.pid".

And that's the problem. When postgres is shutdown, this file doesn't appear to be deleted. To make matters slightly more irritating, deleting this file can't be done from explorer either. You need to go into a cygwin bash and "rm -f postmaster.pid".

There might be a work around for this, but unfortuntely I don't know what it is.

Thanks. Worked perfectly. I was able to delete it from explorer, using the postgres user I setup that has ownership of those files.

Originally Posted by sanka69

This problem has hunted me since I started using Postgres on Windows. That is, assuming it's the same problem;
Check in your log files for something like this:

Code:

FATAL: pre-existing shared memory block (key 5432001, ID 0) 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 "/usr/share/postgresql/data/postmaster.pid".

And that's the problem. When postgres is shutdown, this file doesn't appear to be deleted. To make matters slightly more irritating, deleting this file can't be done from explorer either. You need to go into a cygwin bash and "rm -f postmaster.pid".

There might be a work around for this, but unfortuntely I don't know what it is.