Re: A small problem when rehashing catalog cache

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: A small problem when rehashing catalog cache
Дата
Msg-id aUIk-Sht-VsN4oZz@paquier.xyz
обсуждение исходный текст
Ответ на Re: A small problem when rehashing catalog cache  ("cca5507" <cca5507@qq.com>)
Ответы Re: A small problem when rehashing catalog cache
Список pgsql-hackers
On Wed, Dec 17, 2025 at 11:12:46AM +0800, cca5507 wrote:
> Although this does not affect correctness, I'd like to propose a
> patch to fix it.

That's an interesting point.

Indeed, the code bothers putting a fresh matching entry at the
beginning of a bucket, and the code does the opposite when moving
entries around, which is inconsistent to say the least.  If we move
the entries at the tail instead as you are suggesting the "freshness"
would be preserved better.  This deserves a comment, at least.

20cb18db4668 has added the RehashCatCache() part, with 473182c9523a
copying the same pattern for RehashCatCacheLists().

Thoughts or opinions from others?
--
Michael

Вложения

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