Document for wal_log_hints
Hi,
When I read the document for wal_log_hints, I see:
<para>
If data checksums are enabled, hint bit updates are always WAL-logged
and this setting is ignored. You can use this setting to test how much
extra WAL-logging would occur if your database had data checksums
enabled.
</para>
I think if it should be changed to ".. if your database had data
checksums *disabled*".
Per my check, wal_log_hints is not used except the case:
#define XLogHintBitIsNeeded() (DataChecksumsEnabled() || wal_log_hints)
So if data checksums is enabled, nothing can be tested when turning
wal_log_hints on/off.
--
Best Regards
Andy Fan
Attachments:
v1-0001-doc-correct-the-method-to-test-the-impact-of-wal_.patchtext/x-diffDownload
From f9925545a752475fce61caea942a0057106636e4 Mon Sep 17 00:00:00 2001
From: Andy Fan <zhihuifan1213@163.com>
Date: Tue, 19 Nov 2024 08:58:22 +0800
Subject: [PATCH v1 1/1] doc: correct the method to test the impact of
wal_log_hints.
---
doc/src/sgml/config.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index a84e60c09b..4fcd495e7b 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -3319,7 +3319,7 @@ include_dir 'conf.d'
If data checksums are enabled, hint bit updates are always WAL-logged
and this setting is ignored. You can use this setting to test how much
extra WAL-logging would occur if your database had data checksums
- enabled.
+ disabled.
</para>
<para>
--
2.45.1
On Tue, Nov 19, 2024 at 09:03:57AM +0800, Andy Fan wrote:
So if data checksums is enabled, nothing can be tested when turning
wal_log_hints on/off.
@@ -3319,7 +3319,7 @@ include_dir 'conf.d'
If data checksums are enabled, hint bit updates are always WAL-logged
and this setting is ignored. You can use this setting to test how much
extra WAL-logging would occur if your database had data checksums
- enabled.
+ disabled.
</para>
It seems to me that the point if that enabling wal_log_hints is able
to emulate how much WAL would be generated should data checksums be
*enabled*. So the original text looks correct to me.
--
Michael
Michael Paquier <michael@paquier.xyz> writes:
On Tue, Nov 19, 2024 at 09:03:57AM +0800, Andy Fan wrote:
So if data checksums is enabled, nothing can be tested when turning
wal_log_hints on/off.
@@ -3319,7 +3319,7 @@ include_dir 'conf.d'
If data checksums are enabled, hint bit updates are always WAL-logged
and this setting is ignored. You can use this setting to test how much
extra WAL-logging would occur if your database had data checksums
- enabled.
+ disabled.
</para>It seems to me that the point if that enabling wal_log_hints is able
to emulate how much WAL would be generated should data checksums be
*enabled*. So the original text looks correct to me.
OK.. your explainatin looks good to me. so we should keep the original
one. Thanks for the check!
--
Best Regards
Andy Fan