Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Дата
Msg-id ZIgIjhYW81WCTYc4@paquier.xyz
обсуждение исходный текст
Ответ на Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)  (Gurjeet Singh <gurjeet@singh.im>)
Ответы Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Mon, Jun 12, 2023 at 10:51:24PM -0700, Gurjeet Singh wrote:
> To me, it looks like these checks are a result of code being
> copy-pasted from somewhere else, where this check might have been
> necessary. The checks are sure not necessary at these spots.

I am not completely sure based on my read of the code, but isn't this
check needed to avoid some kind of race condition with a concurrent
backend may have worked on the relation when attempting to get the
lock?
--
Michael

Вложения

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Improve logging when using Huge Pages
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Improving FTS for Greek