Re: crash recovery vs partially written WAL

2020-12-31 Thread Bruce Momjian
On Thu, Dec 31, 2020 at 02:27:44PM -0500, Stephen Frost wrote: > Greetings, > > * Bruce Momjian (br...@momjian.us) wrote: > > On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > > > A question from a colleague made me wonder if there are scenarios where > > > two subsequent crashes

Re: crash recovery vs partially written WAL

2020-12-31 Thread Stephen Frost
Greetings, * Bruce Momjian (br...@momjian.us) wrote: > On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > > A question from a colleague made me wonder if there are scenarios where > > two subsequent crashes could lead to wrong WAL to be applied. > > > > Imagine the following

Re: crash recovery vs partially written WAL

2020-12-31 Thread Bruce Momjian
On Wed, Dec 30, 2020 at 12:52:46PM -0800, Andres Freund wrote: > Hi, > > A question from a colleague made me wonder if there are scenarios where > two subsequent crashes could lead to wrong WAL to be applied. > > Imagine the following scenario > [ xlog page 1 ][ xlog page 2 ][ xlog page 3 ][

crash recovery vs partially written WAL

2020-12-30 Thread Andres Freund
Hi, A question from a colleague made me wonder if there are scenarios where two subsequent crashes could lead to wrong WAL to be applied. Imagine the following scenario [ xlog page 1 ][ xlog page 2 ][ xlog page 3 ][ xlog page 4 ] ^flush^write ^insert