mirror of
https://github.com/postgres/postgres.git
synced 2025-12-21 05:21:08 +03:00
Convert [autovacuum_]vacuum_cost_delay into floating-point GUCs.
This change makes it possible to specify sub-millisecond delays, which work well on most modern platforms, though that was not true when the cost-delay feature was designed. To support this without breaking existing configuration entries, improve guc.c to allow floating-point GUCs to have units. Also, allow "us" (microseconds) as an input/output unit for time-unit GUCs. (It's not allowed as a base unit, at least not yet.) Likewise change the autovacuum_vacuum_cost_delay reloption to be floating-point; this forces a catversion bump because the layout of StdRdOptions changes. This patch doesn't in itself change the default values or allowed ranges for these parameters, and it should not affect the behavior for any already-allowed setting for them. Discussion: https://postgr.es/m/1798.1552165479@sss.pgh.pa.us
This commit is contained in:
@@ -243,7 +243,6 @@ typedef struct AutoVacOpts
|
||||
bool enabled;
|
||||
int vacuum_threshold;
|
||||
int analyze_threshold;
|
||||
int vacuum_cost_delay;
|
||||
int vacuum_cost_limit;
|
||||
int freeze_min_age;
|
||||
int freeze_max_age;
|
||||
@@ -252,6 +251,7 @@ typedef struct AutoVacOpts
|
||||
int multixact_freeze_max_age;
|
||||
int multixact_freeze_table_age;
|
||||
int log_min_duration;
|
||||
float8 vacuum_cost_delay;
|
||||
float8 vacuum_scale_factor;
|
||||
float8 analyze_scale_factor;
|
||||
} AutoVacOpts;
|
||||
|
||||
Reference in New Issue
Block a user