Re: Should the docs have a warning about pg_stat_reset()?

2019-04-14 Thread Jeff Janes
On Wed, Apr 10, 2019 at 2:52 PM Bruce Momjian wrote: > > OK, let me step back. Why are people resetting the statistics > regularly? Based on that purpose, does it make sense to clear the > stats that effect autovacuum? > When I've done it (not regularly, thankfully), it was usually because I

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-14 Thread Tomas Vondra
On Sun, Apr 14, 2019 at 09:11:52AM -0500, Joe Conway wrote: On 4/13/19 3:42 PM, Tomas Vondra wrote: If only we had a way to regularly snapshot the data from within the database, and then compute the deltas on that. If only we could insert data from one table into another one a then do some

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-14 Thread Joe Conway
On 4/13/19 3:42 PM, Tomas Vondra wrote: > If only we had a way to regularly snapshot the data from within the > database, and then compute the deltas on that. If only we could insert > data from one table into another one a then do some analysics on it, > with like small windows moving over the

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-13 Thread Tomas Vondra
On Wed, Apr 10, 2019 at 08:09:34PM -0300, Euler Taveira wrote: Em qua, 10 de abr de 2019 às 16:33, Alvaro Herrera escreveu: On 2019-Apr-10, Bruce Momjian wrote: > On Thu, Apr 11, 2019 at 04:14:11AM +1200, David Rowley wrote: > > I still think we should start with a warning about

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-13 Thread Vik Fearing
On 27/03/2019 22:28, Peter Eisentraut wrote: > On 2019-03-26 16:28, Euler Taveira wrote: >> I don't remember why we didn't consider table without stats to be >> ANALYZEd. Isn't it the case to fix autovacuum? Analyze >> autovacuum_count + vacuum_count = 0? > > When the autovacuum system was

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread David Rowley
On Thu, 11 Apr 2019 at 06:52, Bruce Momjian wrote: > > OK, let me step back. Why are people resetting the statistics > regularly? Based on that purpose, does it make sense to clear the > stats that effect autovacuum? I can't speak for everyone, but once upon a time when I first started using

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread Euler Taveira
Em qua, 10 de abr de 2019 às 16:33, Alvaro Herrera escreveu: > > On 2019-Apr-10, Bruce Momjian wrote: > > > On Thu, Apr 11, 2019 at 04:14:11AM +1200, David Rowley wrote: > > > > I still think we should start with a warning about pg_stat_reset(). > > > People are surprised by this, and these are

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread Alvaro Herrera
On 2019-Apr-10, Bruce Momjian wrote: > On Thu, Apr 11, 2019 at 04:14:11AM +1200, David Rowley wrote: > > I still think we should start with a warning about pg_stat_reset(). > > People are surprised by this, and these are just the ones who notice: > > > >

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread Bruce Momjian
On Thu, Apr 11, 2019 at 04:14:11AM +1200, David Rowley wrote: > On Sat, 30 Mar 2019 at 00:59, Robert Haas wrote: > > > > On Wed, Mar 27, 2019 at 7:49 PM David Rowley > > wrote: > > > Yeah, analyze, not vacuum. It is a bit scary to add new ways for > > > auto-vacuum to suddenly have a lot of

Re: Should the docs have a warning about pg_stat_reset()?

2019-04-10 Thread David Rowley
On Sat, 30 Mar 2019 at 00:59, Robert Haas wrote: > > On Wed, Mar 27, 2019 at 7:49 PM David Rowley > wrote: > > Yeah, analyze, not vacuum. It is a bit scary to add new ways for > > auto-vacuum to suddenly have a lot of work to do. When all workers > > are busy it can lead to neglect of other

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-29 Thread Robert Haas
On Wed, Mar 27, 2019 at 7:49 PM David Rowley wrote: > Yeah, analyze, not vacuum. It is a bit scary to add new ways for > auto-vacuum to suddenly have a lot of work to do. When all workers > are busy it can lead to neglect of other duties. It's true that there > won't be much in the way of

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-27 Thread David Rowley
On Thu, 28 Mar 2019 at 10:33, Alvaro Herrera wrote: > > On 2019-Mar-27, Peter Eisentraut wrote: > > > On 2019-03-26 16:28, Euler Taveira wrote: > > > I don't remember why we didn't consider table without stats to be > > > ANALYZEd. Isn't it the case to fix autovacuum? Analyze > > >

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-27 Thread Alvaro Herrera
On 2019-Mar-27, Peter Eisentraut wrote: > On 2019-03-26 16:28, Euler Taveira wrote: > > I don't remember why we didn't consider table without stats to be > > ANALYZEd. Isn't it the case to fix autovacuum? Analyze > > autovacuum_count + vacuum_count = 0? > > When the autovacuum system was

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-27 Thread Peter Eisentraut
On 2019-03-26 16:28, Euler Taveira wrote: > I don't remember why we didn't consider table without stats to be > ANALYZEd. Isn't it the case to fix autovacuum? Analyze > autovacuum_count + vacuum_count = 0? When the autovacuum system was introduced, we didn't have those columns. But now it seems

Re: Should the docs have a warning about pg_stat_reset()?

2019-03-26 Thread Euler Taveira
Em ter, 26 de mar de 2019 às 09:54, David Rowley escreveu: > > As I mentioned in [1], I've had a few cases recently about auto-vacuum > not working. On the other thread, it was all about auto-vacuum being > configured to run too slowly. The other culprit for auto-vacuum not > working is when

Should the docs have a warning about pg_stat_reset()?

2019-03-26 Thread David Rowley
As I mentioned in [1], I've had a few cases recently about auto-vacuum not working. On the other thread, it was all about auto-vacuum being configured to run too slowly. The other culprit for auto-vacuum not working is when people periodically use pg_stat_reset(). The problem with