Re: libpq Win32 Mutex performance patch

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq Win32 Mutex performance patch
Дата
Msg-id 16795.1207952753@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: libpq Win32 Mutex performance patch  (Andrew Chernow <ac@esilo.com>)
Ответы Re: libpq Win32 Mutex performance patch  (daveg <daveg@sonic.net>)
Список pgsql-patches
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

В списке pgsql-patches по дате отправления:

Предыдущее
От: Andrew Chernow
Дата:
Сообщение: Re: libpq Win32 Mutex performance patch
Следующее
От: daveg
Дата:
Сообщение: Re: libpq Win32 Mutex performance patch