Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, 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-09-29 14:24:03
Message-ID: AANLkTi=6Y2LCG81ff8BovEa2DrB1PCzSvQp8a=-dJMJk@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Sep 29, 2010 at 15:54, Dave Page <dpage(at)pgadmin(dot)org> wrote:
> On Wed, Sep 29, 2010 at 2:45 PM, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>> On Mon, Sep 27, 2010 at 14:34, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>> On Thu, Sep 9, 2010 at 9:09 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>>>> It's hard to say what the safest option is, I think.  There seem to be
>>>>> basically three proposals on the table:
>>>>
>>>>> 1. Back-port the dead-man switch, and ignore exit 128.
>>>>> 2. Don't back-port the dead-man switch, but ignore exit 128 anyway.
>>>>> 3. Revert to Magnus's original solution.
>>>>
>>>>> Each of these has advantages and disadvantages.  The advantage of #1
>>>>> is that it is safer than #2, and that is usually something we prize
>>>>> fairly highly.  The disadvantage of #1 is that it involves
>>>>> back-porting the dead-man switch, but on the flip side that code has
>>>>> been out in the field for over a year now in 8.4, and AFAIK we haven't
>>>>> any trouble with it.  Solution #3 should be approximately as safe as
>>>>> solution #1, and has the advantage of touching less code in the back
>>>>> branches, but on the other hand it is also NEW code.  So I think it's
>>>>> arguable which is the best solution.  I think I like option #2 least
>>>>> as among those choices, but it's a tough call.
>>>>
>>>> Well, I don't want to use Magnus' original solution in 8.4 or up,
>>>> so I don't like #3 much: it's not only new code but code which would
>>>> get very limited testing.  And I don't believe that the risk of
>>>> unexpected use of exit(128) is large enough to make #1 preferable to #2.
>>>> YMMV.
>>>
>>> So, can we go with #2 for the next point releases of <= 8.3? I
>>> understand that our customer who has been testing that approach hasn't
>>> seen any unexpected side-effects.
>>
>> Do we feel this is safe enough?
>
> I've yet to hear of a way a process can exit with a 128 that seems
> like it could happen in our code.
>
>> Also, just to be clear - they tested the "ignore 128 only" patch?
>
> Yes.

Ok, applied. Please verify that it matches your expectations :D

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Chris Ross 2010-09-29 18:08:33 Re: Unexpected omission of tables with duplicate names across schemas
Previous Message Dave Page 2010-09-29 13:54:23 Re: [BUGS] BUG #5305: Postgres service stops when closing Windows session

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-29 14:56:13 Re: operator dependency of commutator and negator
Previous Message Tatsuo Ishii 2010-09-29 14:22:56 Unable to generate man pages for translated sgml