Обсуждение: Missing XLOG_DEBUG check in AdvanceXLInsertBuffer()?

Поиск
Список
Период
Сортировка

Missing XLOG_DEBUG check in AdvanceXLInsertBuffer()?

От
Andres Freund
Дата:
Hi,

When compiling with WAL_DEBUG defined, but wal_debug set to off, there's
a lot of DEBUG1 spew like
DEBUG:  initialized 1 pages, upto 40/3977E000
DEBUG:  initialized 9 pages, upto 40/39790000
DEBUG:  initialized 1 pages, upto 40/39792000
DEBUG:  initialized 1 pages, upto 40/39794000
DEBUG:  initialized 1 pages, upto 40/39796000
DEBUG:  initialized 1 pages, upto 40/39798000
I find that quite annoying. That specific elog() has been there since
9a20a9b21 in 9.4.

Does somebody mind me backpatching the missing XLOG_DEBUG &&?

#ifdef WAL_DEBUGif (XLOG_DEBUG && npages > 0){    elog(DEBUG1, "initialized %d pages, upto %X/%X",         npages,
(uint32)(NewPageEndPtr >> 32), (uint32) NewPageEndPtr);}
 
#endif

Greetings,

Andres Freund



Re: Missing XLOG_DEBUG check in AdvanceXLInsertBuffer()?

От
Michael Paquier
Дата:
On Wed, Jun 10, 2015 at 8:02 PM, Andres Freund <andres@anarazel.de> wrote:
> Does somebody mind me backpatching the missing XLOG_DEBUG &&?

ISTM that it is a good idea to have it in REL9_4_STABLE as well.
Regards,
-- 
Michael



Re: Missing XLOG_DEBUG check in AdvanceXLInsertBuffer()?

От
Robert Haas
Дата:
On Wed, Jun 10, 2015 at 7:02 AM, Andres Freund <andres@anarazel.de> wrote:
> DEBUG:  initialized 1 pages, upto 40/3977E000
> DEBUG:  initialized 9 pages, upto 40/39790000
> DEBUG:  initialized 1 pages, upto 40/39792000
> DEBUG:  initialized 1 pages, upto 40/39794000
> DEBUG:  initialized 1 pages, upto 40/39796000
> DEBUG:  initialized 1 pages, upto 40/39798000
> I find that quite annoying. That specific elog() has been there since
> 9a20a9b21 in 9.4.
>
> Does somebody mind me backpatching the missing XLOG_DEBUG &&?

While you're at it, maybe you should s/upto/up to/.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company