Thread: PostgreSQL on Windows not starting

PostgreSQL on Windows not starting

From
Chris Travers
Date:
I have a customer who is having issues starting PostgreSQL 8.1 on
Windows.  It worked for a while and now doesn't appear to be running.  I
thought it was probably a stale pidfile, but had him search and could
not find it.  Is the pid information still in a pidfile or is it in the
registry somewhere on Windows?  I am suggesting that he try to start the
service manually and look for error messages.  But in the mean time I
thought I would ask.

Best Wishes,
Chris Travers
Metatron Technology Consulting

Attachment

Re: PostgreSQL on Windows not starting

From
Oisin Glynn
Date:
Chris Travers wrote:

> I have a customer who is having issues starting PostgreSQL 8.1 on
> Windows.  It worked for a while and now doesn't appear to be running.
> I thought it was probably a stale pidfile, but had him search and
> could not find it.  Is the pid information still in a pidfile or is it
> in the registry somewhere on Windows?  I am suggesting that he try to
> start the service manually and look for error messages.  But in the
> mean time I thought I would ask.
>
> Best Wishes,
> Chris Travers
> Metatron Technology Consulting
>
>------------------------------------------------------------------------
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: Don't 'kill -9' the postmaster
>
>
Possile reason I hit a while ago was the account that was created for
the PostgreSQL service was set to need a PWD change at login and so the
service would not start,  I was looking in all sorts of other areas
before I spotted it, I think it was due to some domain policy as I had
not seen it before or since. Or perhaps the account pwd is set to expire.

Oisin

Re: PostgreSQL on Windows not starting

From
"Harald Armin Massa"
Date:
Chris,

i dove through all sorts of pain with windows security and PostgreSQL services while postgresql on win32 was in beta. Even deployed some big application to > 30 computers installing win32 PostgreSQL in beta. So, some areas where I had things to learn:

 1.) group policies.
On win32 computers within a domain, as a local administrator you are quite able to create (local) users with all sort of privileges; esp. if you do it via the api and not with GUI tools from MS.
Group Policies will NOT interfer with the creation of a user that is outside the policie! ... but it will silently roll his priviliges back to "normal", whatever "normal" is in that domain.

Most common error: the PostgreSQL service user needs the "logon as service" privilege. No normal user needs it, so most "normal user" policies (esp. the default by Microsoft) strips this privilege. On a "random time basis"  - that is, not with every logon, but every 2 to 7 days. Have fun with bug hunting!


2.) Problems in the field of sockets
PostgreSQL spawns (or forks?) a new process to deal with every connection. The master has to pass an open connection socket to this child. SOME

- firewalls
- voice over ip
- adult service USB tokens
- viral scanners
- computer telephony integration software

screw up the Windows tcp/ip stack. We spend some nights in repairing ( that is: me crying and testing, Magnus patching and compiling) the "passing of sockets even if the tcp/ip stack is screwed"; but maybe, even maybe your customer found a new way to destroy it?

3.) read the event log
4.) read the log in data/pg_log

Best wishes

Harald

--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
PostreSQL - works as documented

Re: PostgreSQL on Windows not starting

From
"Magnus Hagander"
Date:
> I have a customer who is having issues starting PostgreSQL
> 8.1 on Windows.  It worked for a while and now doesn't appear
> to be running.  I thought it was probably a stale pidfile,
> but had him search and could not find it.  Is the pid
> information still in a pidfile or is it in the registry
> somewhere on Windows?  I am suggesting that he try to start
> the service manually and look for error messages.  But in the
> mean time I thought I would ask.

PID file is still used, but I beleive most issues with that one has been
solved by now. And if that is your problem, it should show up fine in
the error messags. Just remember to check all locations (startup
messages go in the eventlog, but if you're using the standard config
once postgresql.conf is loaded the rest of the mesages go in the pg_log
directory)

//Magnus