Re: libpq Win32 Mutex performance patch - Mailing list pgsql-patches

From daveg
Subject Re: libpq Win32 Mutex performance patch
Date
Msg-id 20080411230506.GU11030@sonic.net
Whole thread Raw
In response to Re: libpq Win32 Mutex performance patch  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq Win32 Mutex performance patch
List pgsql-patches
On Fri, Apr 11, 2008 at 06:25:53PM -0400, Tom Lane wrote:
> Andrew Chernow <ac@esilo.com> writes:
> > A more graceful solution would be to print something to stderr and then
> > exit.
>
> stderr doesn't exist, or point to a useful place, in many environments.
> And a forced exit() is no better than a crash for most purposes.
>
> > I don't think libpq should core dump an app by choice.
>
> The case that we are talking about is a bug, or would be a bug if it
> could happen (the fact that we've gotten along happily with no similar
> test in the existing code shows that it can't).  Many forms of bug can
> result in core dumps; it's foolish to try to prevent them all.  And
> bloating one line of code into five or more lines to defend against
> can't-happen cases is a good way to end up with unreadable,
> unmaintainable software.
>
>             regards, tom lane

+1

-dg
--
David Gould       daveg@sonic.net      510 536 1443    510 282 0869
If simplicity worked, the world would be overrun with insects.

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: libpq Win32 Mutex performance patch
Next
From: Andrew Chernow
Date:
Subject: Re: libpq Win32 Mutex performance patch