Starting postgres server automatically on Windows (XP) - Mailing list pgsql-novice

From Nagle, Gail A \(US SSA\)
Subject Starting postgres server automatically on Windows (XP)
Date
Msg-id 7b4bbp$22qugc@dmzms99802.na.baesystems.com
Whole thread Raw
List pgsql-novice

Hello,

 

I have configured my system to start the postgres server automatically upon system startup.

 

In practice, however, the service often fails to start when the machine is restarted. (It does start sometimes!) The problem seems to be that the service “forgets” the password to the non-admin logon account. To rectify the problem, I go to the Windows Computer Management dialog and open the properties applet of the PostgresSQL Database Server 8.3 service. On the “Log On” tab, I re-enter and confirm the password for this account. Then I go back to the “General” tab and press the “Start” button. This method always works. But it will not be an acceptable solution for potential users down the road.

 

I am hoping there is a way to improve the reliability of the automatic startup.

The Windows registry lists values for the following keys under:

HKEY_LOCAL_MACHINE\SOFTWARE\PostgreSQL\Services\pgsql-8.3

 

Data Directory                           F:\Program Files\PostgreSQL\8.3\data\

Database Superuser                  postgres

Display Name                           PostgreSQL Database Server 8.3

Encoding                                  Win1252

Locale                                      English_United States

Port                                          0x00001538

Product Code                           {B823632F-3B72-4514-8861-B961CE263224}

Service Account                        Red000037\pgssvc

 

Pg_ctl status reports the following once the server is running:

% pg_ctl status

pg_ctl: server is running (PID: 3532)

F:/Program Files/PostgreSQL/8.3/bin/postgres.exe "-D" "F:/Program Files/PostgreSQL/8.3/data"

 

I also see that pg_ctl allows us to register and unregister the service. When registering, an option for a password is provided but this is not shown in the registry. Also, I see other things in the registry that do not seem to be settable from pg_ctl.

 

Would unregistering and re-registering the service using the –P option help at all here? Is there some other configuration setting or registry setting that could be used to make the startup 100% reliable?

 

Your help is much appreciated.

 

Thanks,
Gail

pgsql-novice by date:

Previous
From: "Nico Callewaert"
Date:
Subject: Elapsed time between timestamp variables in Function
Next
From: "Nagle, Gail A \(US SSA\)"
Date:
Subject: Re: Starting postgres server automatically on Windows (XP)