Re: Is WAL_DEBUG related code still relevant today?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: Is WAL_DEBUG related code still relevant today?
Дата
Msg-id 5a2e43da-0425-4fc1-9b13-19fd33123950@eisentraut.org
обсуждение исходный текст
Ответ на Is WAL_DEBUG related code still relevant today?  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Ответы Re: Is WAL_DEBUG related code still relevant today?  ("Euler Taveira" <euler@eulerto.com>)
Re: Is WAL_DEBUG related code still relevant today?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 02.12.23 15:06, Bharath Rupireddy wrote:
> I enabled this code by compiling with the WAL_DEBUG macro and setting
> wal_debug GUC to on. Firstly, the compilation on Windows failed
> because XL_ROUTINE was passed inappropriately for XLogReaderAllocate()
> used.

This kind of thing could be mostly avoided if we didn't hide all the 
WAL_DEBUG behind #ifdefs.  For example, in the attached patch, I instead 
changed it so that

     if (XLOG_DEBUG)

resolves to

     if (false)

in the normal case.  That way, we don't need to wrap that in #ifdef 
WAL_DEBUG, and the compiler can see the disabled code and make sure it 
continues to build.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: shveta malik
Дата:
Сообщение: Re: Synchronizing slots from primary to standby
Следующее
От: "Daniel Verite"
Дата:
Сообщение: Re: Make COPY format extendable: Extract COPY TO format implementations