postgres.git / summary / log / commit / refs

commit    67876a17eb36cea9d98a89defe1b5dd4d867bd64
Author:   Andres Freund <andres@anarazel.de>
Date:     Sun Jun 21 16:35:59 2015 +0000

    Add missing check for wal_debug GUC.
    
    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.GF3832@alap3.anarazel.de
    
    Backpatch to 9.4, the first release containing 9a20a9b2.


src/backend/access/transam/xlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index d1b381101b6..8e9754c497a 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -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 [parent: b2ed1682d4e1]