Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Bossart, Nathan
On 7/26/21, 5:48 PM, "Andres Freund" wrote: > On 2021-07-26 20:27:21 +, Bossart, Nathan wrote: >> +1. I was confused by this when working on a WAL pre-allocation >> patch [0]. Perhaps it could be replaced by a new parameter and a new >> field in pg_stat_wal. How about something like log_wal

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Andres Freund
Hi, On 2021-07-25 12:10:07 +0900, Fujii Masao wrote: > It's also worth showing them in monitoring stats view like pg_stat_wal? I'm not convinced that's all that meaningful. It makes sense to include it as part of the checkpoint output, because checkpoints determine when WAL can be recycled etc. I

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Andres Freund
Hi, On 2021-07-26 20:27:21 +, Bossart, Nathan wrote: > +1. I was confused by this when working on a WAL pre-allocation > patch [0]. Perhaps it could be replaced by a new parameter and a new > field in pg_stat_wal. How about something like log_wal_init_interval, > where the value is the mini

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Bossart, Nathan
On 7/26/21, 5:23 PM, "Fujii Masao" wrote: > On 2021/07/27 5:27, Bossart, Nathan wrote: >> +1. I was confused by this when working on a WAL pre-allocation >> patch [0]. Perhaps it could be replaced by a new parameter and a new >> field in pg_stat_wal. How about something like log_wal_init_interv

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Fujii Masao
On 2021/07/27 5:27, Bossart, Nathan wrote: +1. I was confused by this when working on a WAL pre-allocation patch [0]. Perhaps it could be replaced by a new parameter and a new field in pg_stat_wal. How about something like log_wal_init_interval, where the value is the minimum amount of time

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-26 Thread Bossart, Nathan
On 7/24/21, 8:10 PM, "Fujii Masao" wrote: > 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

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-24 Thread Fujii Masao
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 Checkpoi

Re: log_checkpoint's "WAL file(s) added" is misleading to the point of uselessness

2021-07-24 Thread Andres Freund
Hi, On 2021-07-24 15:50:36 -0700, Andres Freund wrote: > As an example, here's the log output of a workload that has a replication slot > preventing WAL files from being recycled (and too small max_wal_size): > > 2021-07-24 15:47:42.524 PDT [2251649][checkpointer][:0] LOG: checkpoint > complete: