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