Use ExtendBufferedRelTo() in XLogReadBufferExtended()
Andres Freund <andres@anarazel.de>
Use ExtendBufferedRelTo() in XLogReadBufferExtended() Instead of extending the relation block-by-block, use ExtendBufferedRelTo(), introduced in 31966b151e6. This is faster and simpler. This also somewhat reduces the danger that disconnected segments pose (which can be "discovered" once the previous segment reaches SEGSIZE), as ExtendBufferedRelTo() won't extend past the block it has been asked. However, the risk of the content of such a disconnected segment being invalid remains. Discussion: https://postgr.es/m/20221029025420.eplyow6k7tgu6he3@awork3.anarazel.de Discussion: https://postgr.es/m/20230223010147.32oir7sb66slqnjk@awork3.anarazel.de
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/transam/xlogutils.c | modified | +7 −22 |
Discussion
- refactoring relation extension and BufferAlloc(), faster COPY 57 messages · 2022-10-29 → 2023-05-03
- XLogReadBufferExtended() vs disconnected segments 2 messages · 2023-02-23