Re: [PATCH] remove condition always true(/src/backend/access/heap/vacuumlazy.c)

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [PATCH] remove condition always true(/src/backend/access/heap/vacuumlazy.c)
Дата
Msg-id 20200330190505.3ep6gbagdha24bjy@alap3.anarazel.de
обсуждение исходный текст
Ответ на [PATCH] remove condition always true (/src/backend/access/heap/vacuumlazy.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Список pgsql-hackers
Hi,

On 2020-03-30 15:07:40 -0300, Ranier Vilela wrote:
> I'm not sure that the patch is 100% correct.

This is *NOT* correct.


> But the fix is about expression about always true.
> But if this patch is correct, he fix one possible bug.
> 
> The comment says:
> * Perform checking of FSM after releasing lock, the fsm is
> * approximate, after all.
> 
> But this is not what the code does, apparently it checks before unlocking.

No, it doesn't. The freespace check isn't the PageIsNew(), it's the
GetRecordedFreeSpace() call. Which happens after unlocking.

Greetings,

Andres Freund



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: backup manifests
Следующее
От: John Naylor
Дата:
Сообщение: Re: tweaking perfect hash multipliers