Re: Is WAL_DEBUG related code still relevant today?
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Noah Misch <noah@leadboat.com>
Cc: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>, Nathan Bossart <nathandbossart@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-12-04T01:14:36Z
Lists: pgsql-hackers
On Sun, Dec 03, 2023 at 11:07:05AM -0800, Noah Misch wrote: > Can be, but the WAL_DEBUG model is mighty convenient: > - Cooperates with backtrace_functions > - Change log_line_prefix to correlate any log_line_prefix fact with WAL records > - See WAL records interleaved with non-WAL log messages > > I don't use it in production, but I use it more than any other of our many > DEBUG macros. So do I as a quick workaround to check the validity of records generated without having to spawn a standby replaying the records. Since 027_stream_regress.pl exists, I agree that its value has decreased and that all patches should have queries to check their records anyway, but it does not make it useless for developers. > Fixing tests is less valuable, especially since it's clear when a test fails > through extra messages the test didn't expect. I bet other DEBUG macros make > some tests fail that way, which doesn't devalue those macros. A test patch > might be okay nonetheless, but a buildfarm member is more likely to have > negative value. It would create urgent work. In the hypothetical buildfarm > member's absence, the project would be just fine if that work never happens. > A buildfarm member that compiles but doesn't test could be okay. I can add the flag in one of my nix animals if we don't have any to provide minimal coverage, that's not an issue for me. I'd suggest to just fix the build on Windows, this flag is a low maintenance burden. -- Michael
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