Hi hackers!
While working on other matters, I noticed that the
`fsm_truncate_avail` function returns a bool parameter which is never
used. This makes me think we can make an enhancement here. There are
basically two options:
1) make return type `void`
2) make use of return value.
I tried the second option. In FreeSpaceMapPrepareTruncateRel (the only
user of fsm_truncate_avail), we call fsm_truncate_avail and then
WAL-log FSM page changes.
Instead, can use `fsm_truncate_avail ` return value to check if
WAL-logging can be skipped.
PFA with these changes.
Thoughts?
P.S. I did not make a POC of real-life scenarios when the FSM page is
unaltered by fsm_truncate_avail (yet). I wonder if there are such
scenarios. If there is none, option 1 should proceed IMHO.
--
Best regards,
Kirill Reshke