Re: 7.3 schedule

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: 7.3 schedule
Дата
Msg-id 15740.1018712761@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: 7.3 schedule  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список pgsql-hackers
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> thought out way of predicting/limiting their size.  (2) How the heck do
> you get rid of obsoleted cached plans, if the things stick around in
> shared memory even after you start a new backend?  (3) A shared cache
> requires locking; contention among multiple backends to access that
> shared resource could negate whatever performance benefit you might hope
> to realize from it.

> I don't understand all these locking problems?

Searching the cache and inserting/deleting entries in the cache probably
have to be mutually exclusive; concurrent insertions probably won't work
either (at least not without a remarkably intelligent data structure).
Unless the cache hit rate is remarkably high, there are going to be lots
of insertions --- and, at steady state, an equal rate of deletions ---
leading to lots of contention.

This could possibly be avoided if the cache is not used for all query
plans but only for explicitly PREPAREd plans, so that only explicit
EXECUTEs would need to search it.  But that approach also makes a
sizable dent in the usefulness of the cache to begin with.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Suggestions please: names for function cachabilityattributes
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: DROP COLUMN (was RFC: Restructuring pg_aggregate)