From: Andres Freund Date: Wed, 10 Jun 2015 11:04:57 +0000 (+0200) Subject: Add missing check for wal_debug GUC. X-Git-Url: http://git.postgresql.org/gitweb/review?a=commitdiff_plain;h=9e4b9629683afda1374d2b09fa37b971d27ea043;p=users%2Fandresfreund%2Fpostgres.git 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. Backpatch to 9.4, the first release containing 9a20a9b2. --- diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 150d56afb8..80389ba8e1 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -1983,7 +1983,7 @@ 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", npages, (uint32) (NewPageEndPtr >> 32), (uint32) NewPageEndPtr);