Re: Various bugs if segment containing redo pointer does not exist

2023-10-24 Thread Robert Haas
On Mon, Oct 23, 2023 at 8:43 PM Andres Freund wrote: > The source of the emode=13=DEBUG2 is that that's hardcoded in > WaitForWALToBecomeAvailable(). I guess the error ought to come from > XLogPageRead(), but all that happens is this: > > case XLREAD_FAIL: >

Re: Various bugs if segment containing redo pointer does not exist

2023-10-23 Thread Andres Freund
Hi, On 2023-10-23 16:21:45 -0700, Andres Freund wrote: > 1) For some reason I haven't yet debugged, the ReadRecord(PANIC) in >PerformWalRecovery() doesn't PANIC, but instead just returns NULL > >We *do* output a DEBUG message, but well, that's insufficient. The debug is from this backtrac

Various bugs if segment containing redo pointer does not exist

2023-10-23 Thread Andres Freund
Hi, I investigated a crashing postgres instance. Turns out the original issue was operator error. But in the process I found a few postgres issues. The scenario is basically that redo LSN and checkpoint LSN are in seperate segments, and that for whatever reason, the file containing the redo LSN is