Re: [HACKERS] new autovacuum criterion for visible pages

2017-02-03 Thread Alvaro Herrera
Stephen Frost wrote: > Tracking the INSERTs as a reason to VACUUM is also very natural when you > consider the need to update BRIN indexes. I am a bit worried that if we > focus just on if the VM needs to be updated or not that we might miss > out on cases where we need to VACUUM because the

Re: [HACKERS] new autovacuum criterion for visible pages

2017-02-03 Thread Jeff Janes
On Sat, Jan 21, 2017 at 1:57 PM, Stephen Frost wrote: > All, > > * Simon Riggs (si...@2ndquadrant.com) wrote: > > On 12 August 2016 at 01:01, Tom Lane wrote: > > > Michael Paquier writes: > > >> In short, autovacuum will need

Re: [HACKERS] new autovacuum criterion for visible pages

2017-02-01 Thread Vik Fearing
On Sun, Jan 22, 2017 at 4:45 PM, Stephen Frost wrote: > Amit, > > * Amit Kapila (amit.kapil...@gmail.com) wrote: > > On Sun, Jan 22, 2017 at 3:27 AM, Stephen Frost > wrote: > > > * Simon Riggs (si...@2ndquadrant.com) wrote: > > >> On 12 August 2016 at

Re: [HACKERS] new autovacuum criterion for visible pages

2017-01-22 Thread Stephen Frost
Amit, * Amit Kapila (amit.kapil...@gmail.com) wrote: > On Sun, Jan 22, 2017 at 3:27 AM, Stephen Frost wrote: > > * Simon Riggs (si...@2ndquadrant.com) wrote: > >> On 12 August 2016 at 01:01, Tom Lane wrote: > >> > Michael Paquier

Re: [HACKERS] new autovacuum criterion for visible pages

2017-01-21 Thread Amit Kapila
On Sun, Jan 22, 2017 at 3:27 AM, Stephen Frost wrote: > All, > > * Simon Riggs (si...@2ndquadrant.com) wrote: >> On 12 August 2016 at 01:01, Tom Lane wrote: >> > Michael Paquier writes: >> >> In short, autovacuum will need to

Re: [HACKERS] new autovacuum criterion for visible pages

2017-01-21 Thread Stephen Frost
All, * Simon Riggs (si...@2ndquadrant.com) wrote: > On 12 August 2016 at 01:01, Tom Lane wrote: > > Michael Paquier writes: > >> In short, autovacuum will need to scan by itself the VM of each > >> relation and decide based on that. > > > > That

Re: [HACKERS] new autovacuum criterion for visible pages

2016-09-05 Thread Simon Riggs
On 12 August 2016 at 01:01, Tom Lane wrote: > Michael Paquier writes: >> In short, autovacuum will need to scan by itself the VM of each >> relation and decide based on that. > > That seems like a worthwhile approach to pursue. The VM is supposed

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-13 Thread Amit Kapila
On Thu, Aug 11, 2016 at 9:29 PM, Jeff Janes wrote: > On Thu, Aug 11, 2016 at 8:32 AM, Amit Kapila wrote: >> On Thu, Aug 11, 2016 at 2:09 AM, Jeff Janes wrote: >>> I wanted to create a new relopt named something like >>>

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-12 Thread Vik Fearing
On 12/08/16 15:15, Peter Eisentraut wrote: > On 8/11/16 11:59 AM, Jeff Janes wrote: >> Insertions and HOT-updates clear vm bits but don't increment the >> counters that those existing parameters are compared to. >> >> Also, the relationship between number of updated/deleted rows and the >> number

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-12 Thread Peter Eisentraut
On 8/11/16 11:59 AM, Jeff Janes wrote: > Insertions and HOT-updates clear vm bits but don't increment the > counters that those existing parameters are compared to. > > Also, the relationship between number of updated/deleted rows and the > number of hint-bits cleared can be hard to predict due

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-12 Thread Masahiko Sawada
On Fri, Aug 12, 2016 at 9:01 AM, Tom Lane wrote: > Michael Paquier writes: >> In short, autovacuum will need to scan by itself the VM of each >> relation and decide based on that. > > That seems like a worthwhile approach to pursue. The VM is

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Jim Nasby
On 8/11/16 10:59 AM, Jeff Janes wrote: On Thu, Aug 11, 2016 at 8:32 AM, Amit Kapila wrote: On Thu, Aug 11, 2016 at 2:09 AM, Jeff Janes wrote: I wanted to create a new relopt named something like autovacuum_vacuum_pagevisible_factor which would

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Tom Lane
Michael Paquier writes: > In short, autovacuum will need to scan by itself the VM of each > relation and decide based on that. That seems like a worthwhile approach to pursue. The VM is supposed to be small, and if you're worried it isn't, you could sample a few pages

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Michael Paquier
On Thu, Aug 11, 2016 at 4:21 PM, Michael Paquier wrote: > On Thu, Aug 11, 2016 at 3:29 PM, Michael Paquier > wrote: >> On Thu, Aug 11, 2016 at 5:39 AM, Jeff Janes wrote: >>> I wanted to create a new relopt named

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Jeff Janes
On Thu, Aug 11, 2016 at 8:32 AM, Amit Kapila wrote: > On Thu, Aug 11, 2016 at 2:09 AM, Jeff Janes wrote: >> I wanted to create a new relopt named something like >> autovacuum_vacuum_pagevisible_factor which would cause autovacuum to >> vacuum a

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Amit Kapila
On Thu, Aug 11, 2016 at 2:09 AM, Jeff Janes wrote: > I wanted to create a new relopt named something like > autovacuum_vacuum_pagevisible_factor which would cause autovacuum to > vacuum a table once less than a certain fraction of the relation's > pages are marked

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Michael Paquier
On Thu, Aug 11, 2016 at 3:29 PM, Michael Paquier wrote: > On Thu, Aug 11, 2016 at 5:39 AM, Jeff Janes wrote: >> I wanted to create a new relopt named something like >> autovacuum_vacuum_pagevisible_factor which would cause autovacuum to >> vacuum

Re: [HACKERS] new autovacuum criterion for visible pages

2016-08-11 Thread Michael Paquier
On Thu, Aug 11, 2016 at 5:39 AM, Jeff Janes wrote: > I wanted to create a new relopt named something like > autovacuum_vacuum_pagevisible_factor which would cause autovacuum to > vacuum a table once less than a certain fraction of the relation's > pages are marked