Re: [PATCHES] pg_autovacuum vacuum cost variables patch v2
"Matthew T. O'Connor" <[EMAIL PROTECTED]> writes: > Ok, here is an updated version of the patch I submitted last night. > This patch now sets the appropriate vacuum cost variables for both > vacuum commands and analyze commands. In addition I have added the new > vacuum cost options to the win32 InstallService function. Applied with minor corrections. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [PATCHES] pg_autovacuum vacuum cost variables patch v2
Tom Lane wrote: "Matthew T. O'Connor" <[EMAIL PROTECTED]> writes: + if(operation == VACUUM_ANALYZE) + update_table_thresholds(dbi, tbl, VACUUM_ANALYZE); + else if(operation == VACUUM_ANALYZE) + update_table_thresholds(dbi, tbl, ANALYZE_ONLY); Surely that's not right ... are there any third cases here? Why not just a one-liner update_table_thresholds(dbi, tbl, operation); Whoops I think that was both a thinko and a typeo :-) Yes your one line will work much better. I'll submit another patch in a few days, unless someone beats me to it. Thanks for fixing that. Matthew ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] pg_autovacuum vacuum cost variables patch v2
"Matthew T. O'Connor" <[EMAIL PROTECTED]> writes: > + if(operation == VACUUM_ANALYZE) > + update_table_thresholds(dbi, tbl, VACUUM_ANALYZE); > + else if(operation == VACUUM_ANALYZE) > + update_table_thresholds(dbi, tbl, ANALYZE_ONLY); Surely that's not right ... are there any third cases here? Why not just a one-liner update_table_thresholds(dbi, tbl, operation); regards, tom lane ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] pg_autovacuum vacuum cost variables patch
"Michael Paesold" <[EMAIL PROTECTED]> writes: > And it seems it affects analyze much more than vacuum, at least if there is > *nothing* to vacuum... (2 seconds -> 8 seconds) Fixed. The original coding was charging a page fetch cost for each row on each page that analyze looked at :-( regards, tom lane ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [PATCHES] pg_autovacuum vacuum cost variables patch
Michael Paesold wrote: Matthew T. O'Connor wrote: Two questions: 1) It is my understanding that these new GUC vars only effect vacuum. That is they do NOT have any effect on an analyze command right? (I ask since I'm only setting the vars before I issue a vacuum command) No, vacuum also affects analyze alone (cvs tip here): (2.5 seconds -> 50 seconds) [snip examples...] I suggest you also issue the SET commands for analyze also. ISTM that there is also no distinction between VACUUM and VACUUM FULL, but I think pg_autovacuum never does a vacuum full, so there is no problem with that. Ok, I'll do that too. ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] pg_autovacuum vacuum cost variables patch
Dave Page wrote: Hi Matthew, It doesn't look like you modified the Win32 service installation code to write these options to the registry when installing the service (see szCommand in InstallService()). Oops Can you tell I didn't write that part of the code ;-) I'll take a look at this tonight after work and send in an updated patch. Matthew ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly
Re: [PATCHES] pg_autovacuum vacuum cost variables patch
Matthew T. O'Connor wrote: Two questions: 1) It is my understanding that these new GUC vars only effect vacuum. That is they do NOT have any effect on an analyze command right? (I ask since I'm only setting the vars before I issue a vacuum command) No, vacuum also affects analyze alone (cvs tip here): (2.5 seconds -> 50 seconds) test=# SET vacuum_cost_delay TO 0; SET Time: 0.308 ms test=# analyze; ANALYZE Time: 2591.259 ms test=# SET vacuum_cost_delay TO 10; SET Time: 0.309 ms test=# analyze; ANALYZE Time: 51737.896 ms And it seems it affects analyze much more than vacuum, at least if there is *nothing* to vacuum... (2 seconds -> 8 seconds) test=# SET vacuum_cost_delay TO 0; SET Time: 0.261 ms test=# VACUUM; VACUUM Time: 1973.137 ms test=# SET vacuum_cost_delay TO 10; SET Time: 0.236 ms test=# vacuum; VACUUM Time: 7966.085 ms I suggest you also issue the SET commands for analyze also. ISTM that there is also no distinction between VACUUM and VACUUM FULL, but I think pg_autovacuum never does a vacuum full, so there is no problem with that. Best Regards, Michael Paesold ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [PATCHES] pg_autovacuum vacuum cost variables patch
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Matthew T. O'Connor > Sent: 26 October 2004 06:40 > To: pgsql-patches > Subject: [PATCHES] pg_autovacuum vacuum cost variables patch > > Please review and if deemed accecptable, please apply to CVS HEAD. Hi Matthew, It doesn't look like you modified the Win32 service installation code to write these options to the registry when installing the service (see szCommand in InstallService()). Regards, Dave ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])