Re: libpq Win32 Mutex performance patch

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: libpq Win32 Mutex performance patch
Дата
Msg-id 20080421135110.1cde485c@mha-laptop
обсуждение исходный текст
Ответ на Re: libpq Win32 Mutex performance patch  (Andrew Chernow <ac@esilo.com>)
Список pgsql-patches
Andrew Chernow wrote:
> Tom Lane wrote:
> >Silently not locking is surely
> > not very safe.
> >
>
> Here is the dump code version of the patch.  If anyone wants the
> return value idea, let me know.

Here's a version of this patch that doesn't use malloc - instead, I had
to change the callers to it a bit.

This makes a difference only on Vista+ really, because prior to Vista
the function InitializeCriticalSection() *can* fail - it will throw an
exception and not return any error code. Which really isn't that
different from just crashing like this latest patch from Andrew would
have us do (on out of memory).

I'm leaning towards going with the simpler one, which is the patch from
Andrew that crashes on out of memory.

Comments/preferences?

//Magnus

Вложения

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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Testing pg_terminate_backend()
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Proposed patch - psql wraps at window width