Re: [HACKERS] Adjust autovacuum naptime automatically

2006-08-17 Thread ITAGAKI Takahiro
Matthew T. O'Connor matthew@zeut.net wrote: Sorry, I should have explained more. What is this based on? That is, based on what information is it deciding to reduce the naptime? If there are some vacuum or analyze jobs, the naptime is shortened (i.e, autovacuum is accelerated). And if there

Re: [HACKERS] Adjust autovacuum naptime automatically

2006-08-17 Thread Matthew T. O'Connor
ITAGAKI Takahiro wrote: Matthew T. O'Connor matthew@zeut.net wrote: What is this based on? That is, based on what information is it deciding to reduce the naptime? If there are some vacuum or analyze jobs, the naptime is shortened (i.e, autovacuum is accelerated). And if there are no jobs,

Re: [HACKERS] Adjust autovacuum naptime automatically

2006-08-17 Thread Jim C. Nasby
On Thu, Aug 17, 2006 at 03:00:00PM +0900, ITAGAKI Takahiro wrote: Matthew T. O'Connor matthew@zeut.net wrote: Sorry, I should have explained more. What is this based on? That is, based on what information is it deciding to reduce the naptime? If there are some vacuum or analyze

Re: [HACKERS] Adjust autovacuum naptime automatically

2006-08-17 Thread Matthew T. O'Connor
Jim C. Nasby wrote: On Thu, Aug 17, 2006 at 03:00:00PM +0900, ITAGAKI Takahiro wrote: IMO, the only reason at all for naptime is because there is a non-trivial cost associated with checking a database to see if any vacuuming is needed. This cost is reduced significantly in the

[HACKERS] Adjust autovacuum naptime automatically

2006-08-16 Thread ITAGAKI Takahiro
Hi hackers, There is a comment in autovacuum.c: | XXX todo: implement sleep scale factor that existed in contrib code. and the attached is a patch to implement it. In contrib code, sleep scale factor was used to adjust naptime only to lengthen the naptime. But I changed the behavior to be able