Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-21 Thread Yugo Nagata
On Fri, 21 Jul 2017 04:58:47 -0700 Andres Freund wrote: > Hi, > > (please don't top-reply on this list) > > On 2017-07-19 14:04:39 +0900, Yugo Nagata wrote: > > On Tue, 18 Jul 2017 10:10:49 -0400 > > Tom Lane wrote: > > > > Thank you for your comments. I understand the problem of my proposal

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-21 Thread Andres Freund
Hi, (please don't top-reply on this list) On 2017-07-19 14:04:39 +0900, Yugo Nagata wrote: > On Tue, 18 Jul 2017 10:10:49 -0400 > Tom Lane wrote: > > Thank you for your comments. I understand the problem of my proposal > patch. Does that mean you're trying to rewrite it in the way that was sug

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Yugo Nagata
On Tue, 18 Jul 2017 10:10:49 -0400 Tom Lane wrote: Thank you for your comments. I understand the problem of my proposal patch. > Andres Freund writes: > > On 2017-07-18 09:42:31 -0400, Tom Lane wrote: > >> I wonder if a better answer wouldn't be to reduce PGSTAT_STAT_INTERVAL. > > > Not sure i

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Tom Lane
Andres Freund writes: > On 2017-07-18 09:42:31 -0400, Tom Lane wrote: >> I wonder if a better answer wouldn't be to reduce PGSTAT_STAT_INTERVAL. > Not sure if that really does that much to solve the concern. Well, it reduces the amount of data churn that a statement shorter than PGSTAT_STAT_INTE

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Andres Freund
Hi, On 2017-07-18 09:42:31 -0400, Tom Lane wrote: > I wonder if a better answer wouldn't be to reduce PGSTAT_STAT_INTERVAL. > I don't think that value has been reconsidered since the code was written, > circa turn of the century. Maybe even make it configurable, though that > could be overkill.

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Tom Lane
Andres Freund writes: > That seems like it'd add a good number of new wakeups, or at least > scheduling of wakeups. Yes, as it stands this will result in a huge increase in alarm-scheduling kernel call traffic. I understand the issue but I do not think this is an acceptable path to a fix. > Or

Re: [HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Andres Freund
Hi, On 2017-07-18 21:49:27 +0900, Yugo Nagata wrote: > After a DML is perfomed, the statistics is sent to pgstat by > pgsent_report_sent(). > However, the mininum time between stas file update is PGSTAT_STAT_INTERVAL, > so if > a few DMLs are performed with short interval, some statistics could

[HACKERS] [PATCH] Make sure all statistics is sent after a few DML are performed

2017-07-18 Thread Yugo Nagata
Hi, After a DML is perfomed, the statistics is sent to pgstat by pgsent_report_sent(). However, the mininum time between stas file update is PGSTAT_STAT_INTERVAL, so if a few DMLs are performed with short interval, some statistics could not be sent until the backend is shutdown. This is not a p