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

Поиск
Список
Период
Сортировка
От Richard Guo
Тема Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Дата
Msg-id CAMbWs48ihqQKK=6vBrL75fQoAv8dc3ahJBGyyiDz3YDFAxbTuA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers

On Tue, Jun 13, 2023 at 3:39 PM Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote:
Gurjeet has mentioned that eb.rel cannot be modified by another
process since the value or memory is in the local stack, and I believe
he's correct.

If the pointed Relation had been blown out, eb.rel would be left
dangling, not nullified. However, I don't believe this situation
happens (or it shouldn't happen) as the entire relation should already
be locked.

Yeah, Gurjeet is right.  I had a thinko here.  eb.rel should not be NULL
pointer in any case.  And as we've acquired the lock for it, it should
not have been closed.  So I think we can remove the check for eb.rel in
the two places.

Thanks
Richard

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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: Do we want a hashset type?
Следующее
От: Richard Guo
Дата:
Сообщение: Re: Replace (GUC_UNIT_MEMORY | GUC_UNIT_TIME) with GUC_UNIT in guc.c