Re: Postgres with pthread

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Postgres with pthread
Дата
Msg-id 1c5ebe48-cc73-669f-f1b5-b24dcded06d8@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Postgres with pthread  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers

On 07.12.2017 00:58, Thomas Munro wrote:
> Using a ton of thread local variables may be a useful stepping stone,
> but if we want to be able to separate threads/processes from sessions
> eventually then I guess we'll want to model sessions as first class
> objects and pass them around explicitly or using a single TLS variable
> current_session.
>
It was my primary intention.
Unfortunately separating all static variables into some kind of session 
context requires much more efforts:
we have to change all accesses to such variables.

But please notice, that from performance point of view access to 
__thread variables is not more expensive then access to static variable or
access to fields of session context structure through current_session.  
And there is no extra space overhead for them.

-- 

Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company



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

Предыдущее
От: Konstantin Knizhnik
Дата:
Сообщение: Re: Postgres with pthread
Следующее
От: Alexander Korotkov
Дата:
Сообщение: Re: compress method for spgist - 2