Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness - Mailing list pgsql-hackers

From Fujii Masao
Subject Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness
Date
Msg-id 3419998a-0e47-9445-9a71-1cf7bca300d4@oss.nttdata.com
Whole thread Raw
In response to log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness  (Andres Freund <andres@anarazel.de>)
Responses Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness  ("Bossart, Nathan" <bossartn@amazon.com>)
Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers

On 2021/07/25 7:50, Andres Freund wrote:
> Hi,
> 
> I've been repeatedly confused by the the number of WAL files supposedly
> added. Even when 100s of new WAL files are created the relevant portion
> of log_checkpoints will only ever list zero or one added WAL file.
> 
> The reason for that is that CheckpointStats.ckpt_segs_added is only
> incremented in PreallocXlogFiles(). Which has the following comment:
>   * XXX this is currently extremely conservative, since it forces only one
>   * future log segment to exist, and even that only if we are 75% done with
>   * the current one.  This is only appropriate for very low-WAL-volume systems.
> 
> Whereas in real workloads WAL files are almost exclusively created via
> XLogWrite()->XLogFileInit().
> 
> I think we should consider just removing that field. Or, even better, show
> something accurate instead.

+1 to show something accurate instead.

It's also worth showing them in monitoring stats view like pg_stat_wal?

Regards,

-- 
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Removing "long int"-related limit on hash table sizes
Next
From: Andres Freund
Date:
Subject: Re: pg14b1 stuck in lazy_scan_prune/heap_page_prune of pg_statistic