Re: Protect syscache from bloating with negative cache entries

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Protect syscache from bloating with negative cache entries
Дата
Msg-id 1391.1547845037@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Protect syscache from bloating with negative cache entries  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Protect syscache from bloating with negative cache entries  ("andres@anarazel.de" <andres@anarazel.de>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, Jan 17, 2019 at 2:48 PM Bruce Momjian <bruce@momjian.us> wrote:
>> Unfortunately, because we have not found something we are happy with, we
>> have done nothing.  I agree LRU can be expensive.  What if we do some
>> kind of clock sweep and expiration like we do for shared buffers?  I
>> think the trick is figuring how frequently to do the sweep.  What if we
>> mark entries as unused every 10 queries, mark them as used on first use,
>> and delete cache entries that have not be used in the past 10 queries.

> I still think wall-clock time is a perfectly reasonable heuristic.

The easy implementations of that involve putting gettimeofday() calls
into hot code paths, which would be a Bad Thing.  But maybe we could
do this only at transaction or statement start, and piggyback on the
gettimeofday() calls that already happen at those times.

            regards, tom lane


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

Предыдущее
От: Raúl Marín Rodríguez
Дата:
Сообщение: Re: [PATCH] pgbench tap tests fail if the path contains a perlspecial character
Следующее
От: Andres Freund
Дата:
Сообщение: TestForOldSnapshot() seems to be in the wrong place