From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Chris Travers <chris(at)metatrontech(dot)com>, Cristian Bittel <cbittel(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session |
Date: | 2010-08-23 15:14:00 |
Message-ID: | AANLkTikD-VyRmAGV_2-nG-fpsU9qeLp7+u+Ls6uvhpEC@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs pgsql-hackers |
On Mon, Aug 23, 2010 at 17:09, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> After some discussion with Magnus, I think what is going on here is
>> that the postmaster kicks off a new child process, which terminates
>> before it actually starts running our code, either in OS-supplied code
>> or some sort of "filter" like anti-spam or anti-virus software. It's
>> presumably NOT dying in our code because - at least AFAICS - we don't
>> exit(128) anywhere.
>
> IIRC, in POSIX-compliant shells there's a specific convention about what
> exit(128) means, and it's something that could result from exec()
> failure. It might be too much of a stretch to suppose that Windows is
> following that, but if it is, that would square with your idea that this
> is happening during child process startup.
It is (assuming the idea is correct).
The problem is that the error code is not delivered at CreateProcess()
time - it's delivered later.
>> One way we could possibly improve the situation
>> is to not treat this as a child crash - that is, don't do a
>> crash-and-restart cycle; just treat that backend as having done
>> elog(FATAL).
>
> That seems to me like a great idea for decreasing reliability, not
> increasing it. If you mistakenly classify a child death as "not
> a crash" then you're really seriously hosed; the best outcome you
> can hope for is that the database freezes up without doing any
> major damage to itself.
>
> Furthermore, even if it is an early exit and you can afford to ignore
> it, the client side is still going to see a dropped connection and tell
> the user that the server crashed, and we're still going to get bug
> reports about that.
Yes, but it's Less Evil.
> I would be inclined to write this off as Windows randomness that's
> unfixable on our end. We could recommend that people take a closer
> look at what AV software they have installed and maybe try some other
> one.
It may well be, but we can at least attempt to mitigate it, no?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-08-23 15:37:04 | Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session |
Previous Message | Tom Lane | 2010-08-23 15:09:09 | Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2010-08-23 15:37:04 | Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session |
Previous Message | Tom Lane | 2010-08-23 15:09:09 | Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session |