@@ -396,6 +396,9 @@ WalReceiverMain(const void *startup_data, size_t startup_data_len)
396396
397397 /* Initialize LogstreamResult and buffers for processing messages */
398398 LogstreamResult .Write = LogstreamResult .Flush = GetXLogReplayRecPtr (NULL );
399+ elog (LOG , "WalReceiverMain LogstreamResult.Flush initialized to %X/%X" ,
400+ LSN_FORMAT_ARGS (LogstreamResult .Flush ));
401+
399402 initStringInfo (& reply_message );
400403
401404 /* Initialize nap wakeup times. */
@@ -848,6 +851,8 @@ XLogWalRcvProcessMsg(unsigned char type, char *buf, Size len, TimeLineID tli)
848851 buf += hdrlen ;
849852 len -= hdrlen ;
850853 XLogWalRcvWrite (buf , len , dataStart , tli );
854+ elog (LOG , "XLogWalRcvProcessMsg: wrote %zu bytes of WAL at %X/%X" ,
855+ len , LSN_FORMAT_ARGS (dataStart ));
851856 break ;
852857 }
853858 case 'k' : /* Keepalive */
@@ -960,6 +965,8 @@ XLogWalRcvWrite(char *buf, Size nbytes, XLogRecPtr recptr, TimeLineID tli)
960965 buf += byteswritten ;
961966
962967 LogstreamResult .Write = recptr ;
968+ elog (LOG , "XLogWalRcvFlush LogstreamResult.Write set to %X/%X" ,
969+ LSN_FORMAT_ARGS (LogstreamResult .Write ));
963970 }
964971
965972 /* Update shared-memory status */
@@ -994,6 +1001,9 @@ XLogWalRcvFlush(bool dying, TimeLineID tli)
9941001
9951002 LogstreamResult .Flush = LogstreamResult .Write ;
9961003
1004+ elog (LOG , "XLogWalRcvFlush LogstreamResult.Flush initialized to %X/%X" ,
1005+ LSN_FORMAT_ARGS (LogstreamResult .Flush ));
1006+
9971007 /* Update shared-memory status */
9981008 SpinLockAcquire (& walrcv -> mutex );
9991009 if (walrcv -> flushedUpto < LogstreamResult .Flush )
@@ -1138,7 +1148,7 @@ XLogWalRcvSendReply(bool force, bool requestReply)
11381148 pq_sendbyte (& reply_message , requestReply ? 1 : 0 );
11391149
11401150 /* Send it */
1141- elog (DEBUG2 , "sending write %X/%X flush %X/%X apply %X/%X%s" ,
1151+ elog (LOG , "sending write %X/%X flush %X/%X apply %X/%X%s" ,
11421152 LSN_FORMAT_ARGS (writePtr ),
11431153 LSN_FORMAT_ARGS (flushPtr ),
11441154 LSN_FORMAT_ARGS (applyPtr ),
0 commit comments