BUG #15567: Wal receiver process restart failed when a damaged wal record arrived at standby.

From: "lichuancheng(at)highgo(dot)com" <lichuancheng(at)highgo(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: BUG #15567: Wal receiver process restart failed when a damaged wal record arrived at standby.
Date: 2019-01-03 09:50:48
Message-ID: 2019010317504815140834@highgo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

hello

I have analysis of the causes of bug when report it.

>[Code review]
>I read the code about startup process and walreciver process.
>When a damaged wal record arrived:
>1.The startup process shutdown the walreciver process use function ShutdownWalRcv().
>2.The startup process start the walreciver process use funtion RequestXLogStreaming() by signal PMSIGNAL_START_WALRECEIVER.
>3.The startup process try to read wal record.
> And now reciver process does not startup completely,so the startup process read the damaged wal record another times.
> And startup process set walrcv->walRcvState = WALRCV_STOPPED use function ShutdownWalRcv().
>4.go to 2.
>That's the infinite cycle.

And now i do a patch in mail attachment to solve the bug.
I test it on pg10.5 and work well.

-----
movead

Attachment Content-Type Size
bug15567_lichuancheng_20190103.patch application/octet-stream 992 bytes

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Hugh Ranalli 2019-01-03 16:19:43 Re: BUG #15548: Unaccent does not remove combining diacritical characters
Previous Message Michael Paquier 2019-01-03 01:15:22 Re: BUG #15548: Unaccent does not remove combining diacritical characters