Index: src/backend/utils/misc/guc.c
===================================================================
RCS file: /home/alvherre/Code/cvs/pgsql/src/backend/utils/misc/guc.c,v
retrieving revision 1.395
diff -c -p -r1.395 guc.c
*** src/backend/utils/misc/guc.c	5 Jun 2007 21:50:19 -0000	1.395
--- src/backend/utils/misc/guc.c	7 Jun 2007 15:51:55 -0000
*************** static const char *show_tcp_keepalives_i
*** 169,174 ****
--- 169,175 ----
  static const char *show_tcp_keepalives_count(void);
  static bool assign_autovacuum_max_workers(int newval, bool doit, GucSource source);
  static bool assign_maxconnections(int newval, bool doit, GucSource source);
+ static bool assign_autovac_vac_cost_limit(int newval, bool doit, GucSource source);
  
  /*
   * GUC option variables that are exported from this module
*************** static struct config_int ConfigureNamesI
*** 1329,1335 ****
  			NULL
  		},
  		&autovacuum_vac_cost_limit,
! 		-1, -1, 10000, NULL, NULL
  	},
  
  	{
--- 1330,1336 ----
  			NULL
  		},
  		&autovacuum_vac_cost_limit,
! 		-1, -1, 10000, &assign_autovac_vac_cost_limit, NULL
  	},
  
  	{
*************** assign_autovacuum_max_workers(int newval
*** 6831,6834 ****
--- 6832,6842 ----
  	return true;
  }
  
+ /* autovacuum_vacuum_cost_limit may be -1, but not 0 */
+ static bool
+ assign_autovac_vac_cost_limit(int newval, bool doit, GucSource source)
+ {
+ 	return newval != 0;
+ }
+ 
  #include "guc-file.c"
