pg_autovacuum vacuum cost variables patch v2

Started by Matthew T. O'Connoralmost 22 years ago4 messagespatches
Jump to latest
#1Matthew T. O'Connor
matthew@zeut.net

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.

Please give it another look and apply if deemed acceptable.

Mathew T. O'Connor

Attachments:

pg_autovacuum_vacuum_cost.difftext/x-patch; name=pg_autovacuum_vacuum_cost.diffDownload+202-59
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Matthew T. O'Connor (#1)
Re: pg_autovacuum vacuum cost variables patch v2

"Matthew T. O'Connor" <matthew@zeut.net> 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

#3Matthew T. O'Connor
matthew@zeut.net
In reply to: Tom Lane (#2)
Re: pg_autovacuum vacuum cost variables patch v2

Tom Lane wrote:

"Matthew T. O'Connor" <matthew@zeut.net> 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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Matthew T. O'Connor (#1)
Re: pg_autovacuum vacuum cost variables patch v2

"Matthew T. O'Connor" <matthew@zeut.net> 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