Re: Starting postgres server automatically on Windows (XP)

Поиск
Список
Период
Сортировка
От Nagle, Gail A \(US SSA\)
Тема Re: Starting postgres server automatically on Windows (XP)
Дата
Msg-id 7b4e7t$eclbg@dmzms99902.na.baesystems.com
обсуждение исходный текст
Ответ на Starting postgres server automatically on Windows (XP)  ("Nagle, Gail A \(US SSA\)" <gail.nagle@baesystems.com>)
Список pgsql-novice

Sorry to be answering my own question but it turns out that doing the pg_ctl unregister –N pgsql-8.3 removed the service from the Windows Services List. Then running pg_ctl register with the appropriate parameters seems to have fixed the problem.

 

Other changes that I made, which may or may not have made any difference, were:

1-       Set the password on the non-admin user to never expire

2-       For the –U command, I used the following syntax –U “.\pgssvc” instead of –U “machine_name\pgssvc”

 

BTW, none of these changes affected the registry settings.

 


From: pgsql-novice-owner@postgresql.org [mailto:pgsql-novice-owner@postgresql.org] On Behalf Of Nagle, Gail A (US SSA)
Sent: Wednesday, February 04, 2009 4:36 PM
To: pgsql-novice@postgresql.org
Subject: [NOVICE] Starting postgres server automatically on Windows (XP)

 

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 по дате отправления:

Предыдущее
От: "Nagle, Gail A \(US SSA\)"
Дата:
Сообщение: Starting postgres server automatically on Windows (XP)
Следующее
От: richard terry
Дата:
Сообщение: de-encrypting a password