pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Windows Services and Postgresql 9.1.3
9+ messages / 5 participants
[nested] [flat]

* Windows Services and Postgresql 9.1.3
@ 2012-09-11 20:48  Vincent Dautremont <vincent@searidgetech.com>
  0 siblings, 2 replies; 9+ messages in thread

From: Vincent Dautremont @ 2012-09-11 20:48 UTC (permalink / raw)
  To: pgsql-admin

Hi,
I'm using Postgresql 9.1.3 x64 on Windows 2008,
I'm doing reliability tests and effects and consequences of a server power
failure.

What I see is that when Windows reboots from a power failure sometimes the
Windows postgresql service is not in sync with the actual state of postgres.

For example, after the server had rebooted, I would stop the service from
services.msc
Windows then reports it as stopped but I can still see that the database is
running,  and can use it.
When I would start the service again, I would end up with a timeout waiting
for the service to be started. When in fact the database was always running.

Anyone had that bug/problem before ?

Thank You,
Vincent.

^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-17 04:42  Craig Ringer <ringerc@ringerc.id.au>
  parent: Vincent Dautremont <vincent@searidgetech.com>
  1 sibling, 3 replies; 9+ messages in thread

From: Craig Ringer @ 2012-09-17 04:42 UTC (permalink / raw)
  To: Vincent Dautremont <vincent@searidgetech.com>; +Cc: pgsql-admin

On 09/12/2012 04:48 AM, Vincent Dautremont wrote:

> For example, after the server had rebooted, I would stop the service
> from services.msc
> Windows then reports it as stopped but I can still see that the database
> is running,  and can use it.

Check in the process monitor (or, better, with Process Explorer from 
Sysinternals) to see what user the `postgres.exe` processes are running as.

> When I would start the service again, I would end up with a timeout
> waiting for the service to be started. When in fact the database was
> always running.
>
> Anyone had that bug/problem before ?

Nope. Sounds completely crazy. More info needed, though.

--
Craig Ringer




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-18 01:27  Anibal David Acosta <aa@devshock.com>
  parent: Craig Ringer <ringerc@ringerc.id.au>
  2 siblings, 0 replies; 9+ messages in thread

From: Anibal David Acosta @ 2012-09-18 01:27 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; 'Vincent Dautremont' <vincent@searidgetech.com>; +Cc: pgsql-admin

Yes, is a Bug, sometimes in some circumstances pg_ctl go down but postgres
server still running.

You can easily reproduce.

Go to "task manager", kill the process "pg_ctl" (simulate some kind of crash
or something else).
Now go to services management and try to start again. Start command will
through an error because pg_ctl can't start database because is already
started.

Due to this bug I always use the pg_ctl command directly and not the windows
service.

Running pg_ctl command from command prompt show that postgres server is
running, but windows service show stopped and is not possible to start again
from windows service UI

Maybe a resolution of this is that pg_ctl ignore the start call from windows
(just success it) when it is already running.

Regards

-----Mensaje original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] En nombre de Craig Ringer
Enviado el: lunes, 17 de septiembre de 2012 12:43 a.m.
Para: Vincent Dautremont
CC: pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] Windows Services and Postgresql 9.1.3

On 09/12/2012 04:48 AM, Vincent Dautremont wrote:

> For example, after the server had rebooted, I would stop the service 
> from services.msc Windows then reports it as stopped but I can still 
> see that the database is running,  and can use it.

Check in the process monitor (or, better, with Process Explorer from
Sysinternals) to see what user the `postgres.exe` processes are running as.

> When I would start the service again, I would end up with a timeout 
> waiting for the service to be started. When in fact the database was 
> always running.
>
> Anyone had that bug/problem before ?

Nope. Sounds completely crazy. More info needed, though.

--
Craig Ringer


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-18 01:42  Anibal David Acosta <aa@devshock.com>
  parent: Craig Ringer <ringerc@ringerc.id.au>
  2 siblings, 0 replies; 9+ messages in thread

From: Anibal David Acosta @ 2012-09-18 01:42 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; 'Vincent Dautremont' <vincent@searidgetech.com>; +Cc: pgsql-admin

BTW, the windows service also can remain in an inconsistent state when the
pg_ctl can't stop the postgres server.
I think that pg_ctl uses stop "fast" so, if for some reason postgres don't
response to stop fast, the service in windows service UI appear as stopping
for long time and finally after some kind of timeout it show as not started.

Obviously, if it appear as not started you want to start, but you can't. And
maybe some inexperienced user get crazy, "database is stopped and can't
start" but really DB is started.

What the inexperienced do is the only thing he can do... Restart the server,
when he restart the postgres server receive a KILL message and then
everything get worse


I live this situation time ago and obviously learn :)


-----Mensaje original-----
De: Anibal David Acosta [mailto:aa@devshock.com] 
Enviado el: lunes, 17 de septiembre de 2012 09:27 p.m.
Para: 'Craig Ringer'; 'Vincent Dautremont'
CC: 'pgsql-admin@postgresql.org'
Asunto: RE: [ADMIN] Windows Services and Postgresql 9.1.3

Yes, is a Bug, sometimes in some circumstances pg_ctl go down but postgres
server still running.

You can easily reproduce.

Go to "task manager", kill the process "pg_ctl" (simulate some kind of crash
or something else).
Now go to services management and try to start again. Start command will
through an error because pg_ctl can't start database because is already
started.

Due to this bug I always use the pg_ctl command directly and not the windows
service.

Running pg_ctl command from command prompt show that postgres server is
running, but windows service show stopped and is not possible to start again
from windows service UI

Maybe a resolution of this is that pg_ctl ignore the start call from windows
(just success it) when it is already running.

Regards

-----Mensaje original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] En nombre de Craig Ringer Enviado
el: lunes, 17 de septiembre de 2012 12:43 a.m.
Para: Vincent Dautremont
CC: pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] Windows Services and Postgresql 9.1.3

On 09/12/2012 04:48 AM, Vincent Dautremont wrote:

> For example, after the server had rebooted, I would stop the service 
> from services.msc Windows then reports it as stopped but I can still 
> see that the database is running,  and can use it.

Check in the process monitor (or, better, with Process Explorer from
Sysinternals) to see what user the `postgres.exe` processes are running as.

> When I would start the service again, I would end up with a timeout 
> waiting for the service to be started. When in fact the database was 
> always running.
>
> Anyone had that bug/problem before ?

Nope. Sounds completely crazy. More info needed, though.

--
Craig Ringer


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [ADMIN] Windows Services and Postgresql 9.1.3
@ 2012-09-21 15:06  Anibal David Acosta <aa@devshock.com>
  parent: Craig Ringer <ringerc@ringerc.id.au>
  2 siblings, 0 replies; 9+ messages in thread

From: Anibal David Acosta @ 2012-09-21 15:06 UTC (permalink / raw)
  To: 'Craig Ringer' <ringerc@ringerc.id.au>; 'Vincent Dautremont' <vincent@searidgetech.com>; +Cc: pgsql-general@postgresql.org

Yes, (I think) is a Bug, sometimes in some circumstances pg_ctl go down but
postgres server still running.

You can easily reproduce.

Go to "task manager", kill the process "pg_ctl" (simulate some kind of crash
or something else).
Now go to services management and try to start again. Start command will
through an error because pg_ctl can't start database because is already
started.

Due to this bug I always use the pg_ctl command directly and not the windows
service.

Running pg_ctl command from command prompt show that postgres server is
running, but windows service show stopped and is not possible to start again
from windows service UI

The windows service also can remain in an inconsistent state when the pg_ctl
can't stop the postgres server.
I think that pg_ctl uses stop "fast" so, if for some reason postgres don't
response to stop fast, the service in windows service UI appear as stopping
for long time and finally after some kind of timeout it show as not started.

Obviously, if it appear as not started you want to start, but you can't. And
maybe some inexperienced user get crazy, "database is stopped and can't
start" but really DB is started.

What the inexperienced do is the only thing he can do... Restart the server,
when he restart the postgres server receive a KILL message and then
everything get worse


I live this situation time ago and obviously learn :)
Regards

-----Mensaje original-----
De: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] En nombre de Craig Ringer Enviado
el: lunes, 17 de septiembre de 2012 12:43 a.m.
Para: Vincent Dautremont
CC: pgsql-admin@postgresql.org
Asunto: Re: [ADMIN] Windows Services and Postgresql 9.1.3

On 09/12/2012 04:48 AM, Vincent Dautremont wrote:

> For example, after the server had rebooted, I would stop the service 
> from services.msc Windows then reports it as stopped but I can still 
> see that the database is running,  and can use it.

Check in the process monitor (or, better, with Process Explorer from
Sysinternals) to see what user the `postgres.exe` processes are running as.

> When I would start the service again, I would end up with a timeout 
> waiting for the service to be started. When in fact the database was 
> always running.
>
> Anyone had that bug/problem before ?

Nope. Sounds completely crazy. More info needed, though.

--
Craig Ringer


--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make
changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin





^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-21 16:33  Scott Marlowe <scott.marlowe@gmail.com>
  parent: Vincent Dautremont <vincent@searidgetech.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Scott Marlowe @ 2012-09-21 16:33 UTC (permalink / raw)
  To: Vincent Dautremont <vincent@searidgetech.com>; +Cc: pgsql-admin

On Tue, Sep 11, 2012 at 2:48 PM, Vincent Dautremont
<vincent@searidgetech.com> wrote:
> Hi,
> I'm using Postgresql 9.1.3 x64 on Windows 2008,
> I'm doing reliability tests and effects and consequences of a server power
> failure.

If you're looking to test for reliability and bugginess, I'd highly
suggest testing against the latest minor version of 9.1.5.




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-21 22:25  Walter Hurry <walterhurry@gmail.com>
  parent: Scott Marlowe <scott.marlowe@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Walter Hurry @ 2012-09-21 22:25 UTC (permalink / raw)
  To: pgsql-admin

On Fri, 21 Sep 2012 10:33:25 -0600, Scott Marlowe wrote:

> On Tue, Sep 11, 2012 at 2:48 PM, Vincent Dautremont
> <vincent@searidgetech.com> wrote:
>> Hi,
>> I'm using Postgresql 9.1.3 x64 on Windows 2008,
>> I'm doing reliability tests and effects and consequences of a server
>> power failure.
> 
> If you're looking to test for reliability and bugginess, I'd highly
> suggest testing against the latest minor version of 9.1.5.

If reliability of interest, why is OP using Windows?






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-22 08:46  Craig Ringer <ringerc@ringerc.id.au>
  parent: Walter Hurry <walterhurry@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Craig Ringer @ 2012-09-22 08:46 UTC (permalink / raw)
  To: Walter Hurry <walterhurry@gmail.com>; +Cc: pgsql-admin

On 09/22/2012 06:25 AM, Walter Hurry wrote:
> On Fri, 21 Sep 2012 10:33:25 -0600, Scott Marlowe wrote:
>
>> On Tue, Sep 11, 2012 at 2:48 PM, Vincent Dautremont
>> <vincent@searidgetech.com> wrote:
>>> Hi,
>>> I'm using Postgresql 9.1.3 x64 on Windows 2008,
>>> I'm doing reliability tests and effects and consequences of a server
>>> power failure.
>>
>> If you're looking to test for reliability and bugginess, I'd highly
>> suggest testing against the latest minor version of 9.1.5.
>
> If reliability of interest, why is OP using Windows?

FWIW, my Win2k8 server has been rock solid since installation, with only 
*extremely* infrequent reboots for patches as few of the issues patched 
are network-exploitable.

These days Windows is a rather solid platform. It still weirds me out, 
but that's how it is. I've had more stability issues on my Linux servers 
lately (though that's significantly to do with some of the cheap and 
nasty hardware they're on).

--
Craig Ringer




^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: Windows Services and Postgresql 9.1.3
@ 2012-09-24 13:38  Vincent Dautremont <vincent@searidgetech.com>
  parent: Craig Ringer <ringerc@ringerc.id.au>
  0 siblings, 0 replies; 9+ messages in thread

From: Vincent Dautremont @ 2012-09-24 13:38 UTC (permalink / raw)
  To: Craig Ringer <ringerc@ringerc.id.au>; +Cc: Walter Hurry <walterhurry@gmail.com>; pgsql-admin

Guys,
Thank you for the info about this.
(we are using windows, as we don't have high loads usage of the database
and we use then the same server to run our server applications).

Vincent.

On Sat, Sep 22, 2012 at 4:46 AM, Craig Ringer <ringerc@ringerc.id.au> wrote:

> On 09/22/2012 06:25 AM, Walter Hurry wrote:
>
>> On Fri, 21 Sep 2012 10:33:25 -0600, Scott Marlowe wrote:
>>
>>  On Tue, Sep 11, 2012 at 2:48 PM, Vincent Dautremont
>>> <vincent@searidgetech.com> wrote:
>>>
>>>> Hi,
>>>> I'm using Postgresql 9.1.3 x64 on Windows 2008,
>>>> I'm doing reliability tests and effects and consequences of a server
>>>> power failure.
>>>>
>>>
>>> If you're looking to test for reliability and bugginess, I'd highly
>>> suggest testing against the latest minor version of 9.1.5.
>>>
>>
>> If reliability of interest, why is OP using Windows?
>>
>
> FWIW, my Win2k8 server has been rock solid since installation, with only
> *extremely* infrequent reboots for patches as few of the issues patched are
> network-exploitable.
>
> These days Windows is a rather solid platform. It still weirds me out, but
> that's how it is. I've had more stability issues on my Linux servers lately
> (though that's significantly to do with some of the cheap and nasty
> hardware they're on).
>
> --
> Craig Ringer
>
>
>
> --
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/**mailpref/pgsql-admin<http://www.postgresql.org/mailpref/pgsql-admin;
>

^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2012-09-24 13:38 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-09-11 20:48 Windows Services and Postgresql 9.1.3 Vincent Dautremont <vincent@searidgetech.com>
2012-09-17 04:42 ` Craig Ringer <ringerc@ringerc.id.au>
2012-09-18 01:27   ` Anibal David Acosta <aa@devshock.com>
2012-09-18 01:42   ` Anibal David Acosta <aa@devshock.com>
2012-09-21 15:06   ` Anibal David Acosta <aa@devshock.com>
2012-09-21 16:33 ` Scott Marlowe <scott.marlowe@gmail.com>
2012-09-21 22:25   ` Walter Hurry <walterhurry@gmail.com>
2012-09-22 08:46     ` Craig Ringer <ringerc@ringerc.id.au>
2012-09-24 13:38       ` Vincent Dautremont <vincent@searidgetech.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox