Re: XLogReadBufferExtended() vs disconnected segments

2023-02-22 Thread Andres Freund
Hi, On 2023-02-22 17:01:47 -0800, Andres Freund wrote: > One way to to defend against this would be to make mdextend(), whenever it > extends into the last block of a segment, unlink the next segment - it can't > be a validly existing contents. But it seems scary to just unlink entire >

XLogReadBufferExtended() vs disconnected segments

2023-02-22 Thread Andres Freund
Hi, I was trying to implement ExtendRelationBufferedTo(), responding to a review comment by Heikki, in https://www.postgresql.org/message-id/2023003152.rh4s75aedj65h...@awork3.anarazel.de Which lead me to stare at the P_NEW do while loop in XLogReadBufferExtended(). I first started to reply