Re: Is WAL_DEBUG related code still relevant today?
Euler Taveira <euler@eulerto.com>
From: "Euler Taveira" <euler@eulerto.com>
To: "Michael Paquier" <michael@paquier.xyz>
Cc: "Peter Eisentraut" <peter@eisentraut.org>,
"Bharath Rupireddy" <bharath.rupireddyforpostgres@gmail.com>,
"PostgreSQL Hackers" <pgsql-hackers@lists.postgresql.org>
Date: 2023-12-07T02:32:19Z
Lists: pgsql-hackers
On Wed, Dec 6, 2023, at 9:51 PM, Michael Paquier wrote:
> PerformWalRecovery() with its log for RM_XACT_ID is something that
> stresses me a bit though because this is in the main redo loop which
> is never free. The same can be said about GenericXLogFinish() because
> the extra computation happens while holding a buffer and marking it
> dirty. The ones in xlog.c are free of charge as they are called
> outside any critical portions.
>
> This makes me wonder how much we need to care about
> trace_recovery_messages, actually, and I've never used it.
IIUC trace_recovery_messages was a debugging aid in the 9.0 era when the HS was
introduced. I'm also wondering if anyone used it in the past years.
elog.c:
* Intention is to keep this for at least the whole of the 9.0 production
* release, so we can more easily diagnose production problems in the field.
* It should go away eventually, though, because it's an ugly and
* hard-to-explain kluge.
*/
int
trace_recovery(int trace_level)
{
if (trace_level < LOG &&
trace_level >= trace_recovery_messages)
return LOG;
return trace_level;
}
--
Euler Taveira
EDB https://www.enterprisedb.com/
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