Should PostgresMain() do a LWLockReleaseAll()?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Should PostgresMain() do a LWLockReleaseAll()?
Дата
Msg-id 20140223163910.GF28858@alap3.anarazel.de
обсуждение исходный текст
Ответы Re: Should PostgresMain() do a LWLockReleaseAll()?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

Currently the error handling of normal backends only does a
LWLockReleaseAll() once CurrentTransactionState->state != TRANS_DEFAULT
because it's called in AbortTransaction(). There's pretty damn few
places that fiddle with lwlocks outside of a transaction command, but I
still do wonder whether it'd wouldn't be a tad more robust to
unconditionally do a LWLockReleaseAll(), just like other error handlers
are doing?
In comparison to the cost of a longjmp and the rest of error handling
that ought to be nearly free.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Kohei KaiGai
Дата:
Сообщение: Re: Custom Scan APIs (Re: Custom Plan node)
Следующее
От: Pavel Stehule
Дата:
Сообщение: often PREPARE can generate high load (and sometimes minutes long unavailability)