Re: libpq Win32 Mutex performance patch

From: Andrew Chernow <ac(at)esilo(dot)com>
To: daveg <daveg(at)sonic(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: libpq Win32 Mutex performance patch
Date: 2008-04-11 23:30:45
Message-ID: 47FFF4A5.60309@esilo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

daveg wrote:
> On Fri, Apr 11, 2008 at 06:25:53PM -0400, Tom Lane wrote:
>> Andrew Chernow <ac(at)esilo(dot)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

okay.

BTW, my real interest here is the libpq hooks patch requires a
lock/unlock for every conn-create, conn-destroy, result-create,
result-destroy. Currently, it looks like only the ssl stuff uses
mutexes. Adding more mutex use is a good case for a more optimized
approach on windows.

andrew

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Brendan Jurd 2008-04-12 06:49:12 Re: Reference by output in : \d <table_name>
Previous Message daveg 2008-04-11 23:05:06 Re: libpq Win32 Mutex performance patch