Add missing check for wal_debug GUC.
authorAndres Freund
Sun, 21 Jun 2015 16:35:59 +0000 (18:35 +0200)
committerAndres Freund
Sun, 21 Jun 2015 16:37:30 +0000 (18:37 +0200)
9a20a9b2 added a new elog(), enabled when WAL_DEBUG is defined. The
other WAL_DEBUG dependant messages check for the wal_debug GUC, but this
one did not. While at it replace 'upto' with 'up to'.

Discussion: 20150610110253[email protected]

Backpatch to 9.4, the first release containing 9a20a9b2.

src/backend/access/transam/xlog.c

index d1b381101b6e0418b63a2747b517c76b3514c336..8e9754c497a6a215980e42c538b51c50b08c14df 100644 (file)
@@ -2255,9 +2255,9 @@ AdvanceXLInsertBuffer(XLogRecPtr upto, bool opportunistic)
    LWLockRelease(WALBufMappingLock);
 
 #ifdef WAL_DEBUG
-   if (npages > 0)
+   if (XLOG_DEBUG && npages > 0)
    {
-       elog(DEBUG1, "initialized %d pages, upto %X/%X",
+       elog(DEBUG1, "initialized %d pages, up to %X/%X",
             npages, (uint32) (NewPageEndPtr >> 32), (uint32) NewPageEndPtr);
    }
 #endif