Re: myProcLocks initialization

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: myProcLocks initialization
Дата
Msg-id CA+TgmoZn1E+fZZYuT5P9OdHWzCCESsnfJ3motScYdsV9PJ8d0w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: myProcLocks initialization  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: myProcLocks initialization
Список pgsql-hackers
On Sun, Oct 30, 2011 at 11:13 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> I'd like to propose the attached patch, which initializes each
>> PGPROC's myProcLocks just once at postmaster startup, rather than
>> every time the PGPROC is handed out to a backend.  These lists should
>> always be emptied before a backend shuts down, so a newly initialized
>> backend will find the lists empty anyway.  Not reinitializing them
>> shaves a few cycles.  In my testing, it saves about 1% of the cost of
>> setting up and tearing down a connection, which is not a ton, but a
>> cycle saved is a cycle earned.
>
> That's not really enough to excite me, and the prospect of problems in
> one session corrupting an unrelated later one is pretty scary from a
> debugging standpoint.  How about at least an Assert that the lock is in
> a clean state?

I can go for that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: myProcLocks initialization
Следующее
От: Pavel Stehule
Дата:
Сообщение: Re: Thoughts on "SELECT * EXCLUDING (...) FROM ..."?