Re: Is WAL_DEBUG related code still relevant today?
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-12-06T11:27:17Z
Lists: pgsql-hackers
Attachments
- 0001-Make-WAL_DEBUG-code-harder-to-break-accidentally.patch (text/plain) patch 0001
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.
Commits
-
Remove trace_recovery_messages
- c7a3e6b46d38 17.0 landed
-
Fix compilation on Windows with WAL_DEBUG
- 7d5a740331bf 13.14 landed
- c49b6cab1e66 14.11 landed
- 87ed81a8739b 15.6 landed
- 6248a2bb92cc 16.2 landed
- 7636725b922c 17.0 landed