Re: profiling connection overhead

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: profiling connection overhead
Дата
Msg-id AANLkTinLXOrut35=uNA1fUD7Oo1mVTbO1apCKgJXwhpd@mail.gmail.com
обсуждение исходный текст
Ответ на Re: profiling connection overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: profiling connection overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, Nov 24, 2010 at 10:25 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> The first optimization that occurred to me was "remove the loop
>> altogether".
>
> Or make it execute only in assert-enabled mode, perhaps.
>
> This check had some use back in the bad old days, but the ResourceOwner
> mechanism has probably removed a lot of the argument for it.

Yeah, that's what I was thinking - this could would have been a good
backstop when our cleanup mechanisms were not as robust as they seem
to be today.  But making the check execute only in assert-enabled more
doesn't seem right, since the check actually acts to mask other coding
errors, rather than reveal them.  Maybe we replace the check with one
that only occurs in an Assert-enabled build and just loops through and
does Assert(PrivateRefCount[i] == 0).  I'm not sure exactly where this
gets called in the shutdown sequence, though - is it sensible to
Assert() here?

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


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Suggested "easy" TODO: pg_dump --from-list
Следующее
От: Tom Lane
Дата:
Сообщение: Re: profiling connection overhead