Document for wal_log_hints

Started by Andy Fanover 1 year ago3 messageshackers
Jump to latest
#1Andy Fan
zhihui.fan1213@gmail.com

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+1-2
#2Michael Paquier
michael@paquier.xyz
In reply to: Andy Fan (#1)
Re: Document for wal_log_hints

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

#3Andy Fan
zhihui.fan1213@gmail.com
In reply to: Michael Paquier (#2)
Re: Document for wal_log_hints

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