Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2021-01-19 Thread Masahiro Ikeda
On 2020-12-22 11:16, Masahiro Ikeda wrote: Thanks for your comments. On 2020-12-22 09:39, Andres Freund wrote: Hi, On 2020-12-21 13:16:50 -0800, Andres Freund wrote: On 2020-12-02 13:52:43 +0900, Fujii Masao wrote: > Pushed. Thanks! Why are wal_records/fpi long, instead of uint64?

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-12-21 Thread Masahiro Ikeda
Thanks for your comments. On 2020-12-22 09:39, Andres Freund wrote: Hi, On 2020-12-21 13:16:50 -0800, Andres Freund wrote: On 2020-12-02 13:52:43 +0900, Fujii Masao wrote: > Pushed. Thanks! Why are wal_records/fpi long, instead of uint64? longwal_records;/* # of WAL

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-12-21 Thread Andres Freund
Hi, On 2020-12-21 13:16:50 -0800, Andres Freund wrote: > On 2020-12-02 13:52:43 +0900, Fujii Masao wrote: > > Pushed. Thanks! > > Why are wal_records/fpi long, instead of uint64? > longwal_records;/* # of WAL records produced */ > longwal_fpi;

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-12-21 Thread Andres Freund
Hi, On 2020-12-02 13:52:43 +0900, Fujii Masao wrote: > Pushed. Thanks! Why are wal_records/fpi long, instead of uint64? longwal_records;/* # of WAL records produced */ longwal_fpi;/* # of WAL full page images produced */ uint64

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-12-01 Thread Fujii Masao
On 2020/12/01 14:01, Fujii Masao wrote: On 2020/11/26 16:07, Masahiro Ikeda wrote: On 2020-11-25 20:19, Fujii Masao wrote: On 2020/11/19 16:31, Masahiro Ikeda wrote: On 2020-11-17 11:46, Fujii Masao wrote: On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-30 Thread Fujii Masao
On 2020/11/26 16:07, Masahiro Ikeda wrote: On 2020-11-25 20:19, Fujii Masao wrote: On 2020/11/19 16:31, Masahiro Ikeda wrote: On 2020-11-17 11:46, Fujii Masao wrote: On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-25 Thread Masahiro Ikeda
On 2020-11-25 20:19, Fujii Masao wrote: On 2020/11/19 16:31, Masahiro Ikeda wrote: On 2020-11-17 11:46, Fujii Masao wrote: On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote:

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-25 Thread Fujii Masao
On 2020/11/19 16:31, Masahiro Ikeda wrote: On 2020-11-17 11:46, Fujii Masao wrote: On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-19 Thread Masahiro Ikeda
On 2020-11-17 12:53, lchch1...@sina.cn wrote: Thanks for your comments. You're understanding is almost the same as mine. It describes when not only backends but also other backgrounds initialize a new wal page, wal buffer's space is already used and there is no space. 'Total number of times

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-18 Thread Masahiro Ikeda
On 2020-11-17 11:46, Fujii Masao wrote: On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice.

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-16 Thread lchch1...@sina.cn
>> Thanks for your comments. >> >> You're understanding is almost the same as mine. >> It describes when not only backends but also other backgrounds initialize a >> new wal page, >> wal buffer's space is already used and there is no space. >> >>> 'Total number of times WAL data written to the

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-16 Thread Fujii Masao
On 2020/11/16 18:24, Masahiro Ikeda wrote: On 2020-11-13 12:32, lchch1...@sina.cn wrote: Now, pg_stat_wal supports reset all informantion in WalStats using pg_stat_reset_shared('wal') function. Isn't it enough? Yes it ok, sorry I miss this infomation. OK. 3. I do not think it's a

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-16 Thread Fujii Masao
On 2020/11/16 16:35, Masahiro Ikeda wrote: On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-16 Thread Masahiro Ikeda
On 2020-11-13 12:32, lchch1...@sina.cn wrote: Now, pg_stat_wal supports reset all informantion in WalStats using pg_stat_reset_shared('wal') function. Isn't it enough? Yes it ok, sorry I miss this infomation. OK. 3. I do not think it's a correct describe in document for 'wal_buffers_full'.

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-15 Thread Masahiro Ikeda
On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-15 Thread Masahiro Ikeda
On 2020-11-12 16:27, Fujii Masao wrote: On 2020/11/12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03,

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-12 Thread lchch1...@sina.cn
>Now, pg_stat_wal supports reset all informantion in WalStats >using pg_stat_reset_shared('wal') function. >Isn't it enough? Yes it ok, sorry I miss this infomation. >> 3. I do not think it's a correct describe in document for >> 'wal_buffers_full'. >Where should I rewrite the description? If

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-11 Thread Fujii Masao
On 2020/11/12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-11 Thread Fujii Masao
On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-05 Thread Masahiro Ikeda
On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda wrote in On 2020-10-20 12:46, Amit Kapila wrote:

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-29 Thread Fujii Masao
On 2020/10/20 11:31, Masahiro Ikeda wrote: Hi, I think we need to add some statistics to pg_stat_wal view. Although there are some parameter related WAL, there are few statistics for tuning them. I think it's better to provide the following statistics. Please let me know your comments.

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-29 Thread Fujii Masao
On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda wrote in On 2020-10-20 12:46, Amit Kapila wrote: > I see that we also need to add

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-29 Thread Masahiro Ikeda
Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda wrote in On 2020-10-20 12:46, Amit Kapila wrote: > I see that we also need to add extra code to capture these stats (some > of which

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread Kyotaro Horiguchi
At Thu, 22 Oct 2020 10:44:53 +0900, Masahiro Ikeda wrote in > On 2020-10-21 18:03, Kyotaro Horiguchi wrote: > > At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda > > wrote in > >> On 2020-10-20 12:46, Amit Kapila wrote: > >> > I see that we also need to add extra code to capture these stats

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread Masahiro Ikeda
On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda wrote in On 2020-10-20 12:46, Amit Kapila wrote: > I see that we also need to add extra code to capture these stats (some > of which is in performance-critical path especially in >

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread Masahiro Ikeda
On 2020-10-21 15:54, lchch1...@sina.cn wrote: I think it's really a more convenient way to collect wal usage information, with it we can query when I want. Several points on my side: Thanks for your comments. 1. It will be nice If you provide a chance to reset the information in WalStats,

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread Masahiro Ikeda
On 2020-10-21 13:41, Amit Kapila wrote: On Tue, Oct 20, 2020 at 12:41 PM Masahiro Ikeda wrote: On 2020-10-20 12:46, Amit Kapila wrote: > On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda >> 1. Basic statistics of WAL activity >> >> - wal_records: Total number of WAL records generated >> -

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread Kyotaro Horiguchi
At Tue, 20 Oct 2020 16:11:29 +0900, Masahiro Ikeda wrote in > On 2020-10-20 12:46, Amit Kapila wrote: > > I see that we also need to add extra code to capture these stats (some > > of which is in performance-critical path especially in > > XLogInsertRecord) which again makes me a bit

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-21 Thread lchch1...@sina.cn
I think it's really a more convenient way to collect wal usage information, with it we can query when I want. Several points on my side: 1. It will be nice If you provide a chance to reset the information in WalStats, so that we can reset it without restart the database. 2. I think

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-20 Thread Amit Kapila
On Tue, Oct 20, 2020 at 12:41 PM Masahiro Ikeda wrote: > > On 2020-10-20 12:46, Amit Kapila wrote: > > On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda > >> 1. Basic statistics of WAL activity > >> > >> - wal_records: Total number of WAL records generated > >> - wal_fpi: Total number of WAL full

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-20 Thread Masahiro Ikeda
On 2020-10-20 12:46, Amit Kapila wrote: On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda wrote: Hi, I think we need to add some statistics to pg_stat_wal view. Although there are some parameter related WAL, there are few statistics for tuning them. I think it's better to provide the

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-19 Thread Amit Kapila
On Tue, Oct 20, 2020 at 8:01 AM Masahiro Ikeda wrote: > > Hi, > > I think we need to add some statistics to pg_stat_wal view. > > Although there are some parameter related WAL, > there are few statistics for tuning them. > > I think it's better to provide the following statistics. > Please let me

Add statistics to pg_stat_wal view for wal related parameter tuning

2020-10-19 Thread Masahiro Ikeda
Hi, I think we need to add some statistics to pg_stat_wal view. Although there are some parameter related WAL, there are few statistics for tuning them. I think it's better to provide the following statistics. Please let me know your comments. ``` postgres=# SELECT * from pg_stat_wal; -[