Re: intermittent issue with windows 7 service manager not able to correctly determine or control postgresql 9.4

From: <david(at)andl(dot)org>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: intermittent issue with windows 7 service manager not able to correctly determine or control postgresql 9.4
Date: 2016-05-01 02:57:02
Message-ID: 006601d1a355$258d9b40$70a8d1c0$@andl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have the same problem routinely on Windows 10.

The postgresql-x64-9.5 service shows up in Task Manager as Stopped, but is actually running just fine.

BTW pg_ctl does nothing – silently. The only way to restart the server is to kill off a process or two.

Regards

David M Bennett FACS

_____

Andl - A New Database Language - andl.org

From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of Tom Hodder
Sent: Sunday, 1 May 2016 12:36 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] intermittent issue with windows 7 service manager not able to correctly determine or control postgresql 9.4

Hi All,

I've got several machines running windows 7 which have postgresql 9.4 installed as a service, and configured to start automatically on boot. I am monitoring these services with zabbix and several times a week I get a notification that the postgresql-x64-9.4 service has stopped.

When I login to the machine, the service does appear to be stopped;

However when I check the database, I can query it ok;

C:\Program Files\PostgreSQL\9.4>bin\psql.exe -U postgres -c "SELECT count(*) from media;" association
Password for user postgres:
count
---------
1167846
(1 row)

If I try to start the service from the service manager, I see the following error in the logs;

2016-04-30 05:03:13 BST FATAL: lock file "postmaster.pid" already exists
2016-04-30 05:03:13 BST HINT: Is another postmaster (PID 2556) running in data directory "C:/Program Files/PostgreSQL/9.4/data"?

The pg_ctl tool seems to correctly query the state of the service and return the correct PID;

C:\Program Files\PostgreSQL\9.4>bin\pg_ctl.exe -D "C:\Program Files\PostgreSQL\9.4\data" status
pg_ctl: server is running (PID: 2556)
The other thing that seems to happen is the pgadmin3 tool seems to have lost the ability to control the service as all the options for start/stop are greyed out;

The only option to get the control back is to kill the processes in the task manager or reboot the machine.
Any suggestions on what might be causing this?
Thanks,
Tom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Smith 2016-05-01 03:46:48 Re: JSONB performance enhancement for 9.6
Previous Message Tom Hodder 2016-05-01 02:35:44 intermittent issue with windows 7 service manager not able to correctly determine or control postgresql 9.4