diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c
new file mode 100644
index 4af8fdc..5860a0b
*** a/src/backend/access/transam/xlog.c
--- b/src/backend/access/transam/xlog.c
*************** XLogPageRead(XLogReaderState *xlogreader
*** 10946,10952 ****
  		 * Request a restartpoint if we've replayed too much xlog since the
  		 * last one.
  		 */
! 		if (StandbyModeRequested && bgwriterLaunched)
  		{
  			if (XLogCheckpointNeeded(readSegNo))
  			{
--- 10946,10952 ----
  		 * Request a restartpoint if we've replayed too much xlog since the
  		 * last one.
  		 */
! 		if (bgwriterLaunched)
  		{
  			if (XLogCheckpointNeeded(readSegNo))
  			{
