On Mon, Jul 31, 2017 at 11:15 PM, Seong Son (US) <Seong.Son@datapath.com> wrote:
> So my questions are, could an old WAL segment being resent through the
> network cause crash like this? Shouldn’t Postgresql be able to handle out
> of order WAL segments instead of just crashing?
When the streaming connection between a standby and a primary is cut,
the WAL receiver would restart and try to stream from the beginning of
the last segment it was in the middle of. See RequestXLogStreaming in
walreceiverfuncs.c.
> And what would be the best way to recover the standby server? Resynching
> the entire database seems to be too time consuming.
You may want to check the validity of the so-said WAL segment as well.
Corrupted data could come from it.
--
Michael