pgsql: freespace: Don't return blocks past the end of the main fork.

2024-04-13 Thread Noah Misch
freespace: Don't return blocks past the end of the main fork. GetPageWithFreeSpace() callers assume the returned block exists in the main fork, failing with "could not read block" errors if that doesn't hold. Make that assumption reliable now. It hadn't been guaranteed, due to the weak WAL and

pgsql: freespace: Don't return blocks past the end of the main fork.

2024-04-13 Thread Noah Misch
freespace: Don't return blocks past the end of the main fork. GetPageWithFreeSpace() callers assume the returned block exists in the main fork, failing with "could not read block" errors if that doesn't hold. Make that assumption reliable now. It hadn't been guaranteed, due to the weak WAL and

pgsql: freespace: Don't return blocks past the end of the main fork.

2024-04-13 Thread Noah Misch
freespace: Don't return blocks past the end of the main fork. GetPageWithFreeSpace() callers assume the returned block exists in the main fork, failing with "could not read block" errors if that doesn't hold. Make that assumption reliable now. It hadn't been guaranteed, due to the weak WAL and

pgsql: freespace: Don't return blocks past the end of the main fork.

2024-04-13 Thread Noah Misch
freespace: Don't return blocks past the end of the main fork. GetPageWithFreeSpace() callers assume the returned block exists in the main fork, failing with "could not read block" errors if that doesn't hold. Make that assumption reliable now. It hadn't been guaranteed, due to the weak WAL and