diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2019-03-10 15:01:39 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2019-03-10 15:01:39 -0400 |
commit | caf626b2cd471615914986f18282c03c8282a1f4 (patch) | |
tree | 5ab082c6464a79e44e42ad3119a4b4ddd8013b5f /src/backend/utils/init/globals.c | |
parent | 28a65fc3607a0f45c39a9418f747459bb4f1592a (diff) | |
download | postgresql-caf626b2cd471615914986f18282c03c8282a1f4.tar.gz postgresql-caf626b2cd471615914986f18282c03c8282a1f4.zip |
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
Diffstat (limited to 'src/backend/utils/init/globals.c')
-rw-r--r-- | src/backend/utils/init/globals.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/utils/init/globals.c b/src/backend/utils/init/globals.c index a6ce1845372..6d1e94f8171 100644 --- a/src/backend/utils/init/globals.c +++ b/src/backend/utils/init/globals.c @@ -138,7 +138,7 @@ int VacuumCostPageHit = 1; /* GUC parameters for vacuum */ int VacuumCostPageMiss = 10; int VacuumCostPageDirty = 20; int VacuumCostLimit = 2000; -int VacuumCostDelay = 0; +double VacuumCostDelay = 0; int VacuumPageHit = 0; int VacuumPageMiss = 0; |