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.