Re: Timeline switching with partial WAL records can break replica recovery - Mailing list pgsql-hackers

From Alena Vinter
Subject Re: Timeline switching with partial WAL records can break replica recovery
Date
Msg-id CAGWv16LtOA8BdL4s0t=7Wnn7wn=7hdzr+8H_un+-ZPBkwyn0AA@mail.gmail.com
Whole thread Raw
In response to Re: Timeline switching with partial WAL records can break replica recovery  (Artem Gavrilov <artem.gavrilov@percona.com>)
List pgsql-hackers
> let the new timeline start after incomplete contrecord
This approach seems like it could prevent issues with archiving. Upon reconsideration, I agree that we shouldn’t alter the complete timeline — instead, the missing contrecord should be detected in the next timeline.
However, there’s a problem with the ordering of the `EndOfRecovery` and `MissingContrecord` records: `EndOfRecovery` must be written to WAL at the very beginning of the new timeline. This conflicts with the current design, so we should rethink the solution.
The first easy solution that comes to my mind is to simply extend the `EndOfRecovery` record by adding an `overwritten_lsn` field. As I see it, it won’t change the code much. What do you think?

---
Alena Vinter

pgsql-hackers by date:

Previous
From: jian he
Date:
Subject: Re: CAST(... ON DEFAULT) - WIP build on top of Error-Safe User Functions
Next
From: Andreas Karlsson
Date:
Subject: Re: Remove redundant assignment in CreateWorkExprContext