Database Reference
In-Depth Information
There's more...
postgresql.conf also allows "include directives", which look like the following:
include 'autovacuum.conf'
These specify another file that will be read at that point, just as if those parameters had been
included in the main file.
This can be used to maintain multiple sets of files for autovacuum configuration. Let's say
we have a website that is busy, mainly during the daytime, with some occasional night time
use. We decide to have two profiles, one for daytime, when we want only less aggressive
autovacuuming, and another at night, where we allow more aggressive vacuuming.
We add the following lines to postgresql.conf :
F autovacuum = on
F autovacuum_max_workers = 3
F include 'autovacuum.conf'
and remove all other autovacuum parameters.
We then create one file named autovacuum.conf.day , containing the following parameters:
F autovacuum_analyze_scale_factor = 0.1
F autovacuum_analyze_threshold = 50
F autovacuum_vacuum_cost_delay = 30
F autovacuum_vacuum_cost_limit = -1
F autovacuum_vacuum_scale_factor = 0.2
F autovacuum_vacuum_threshold = 50
and another file named autovacuum.conf.night , that contains the following parameters:
F autovacuum_analyze_scale_factor = 0.05
F autovacuum_analyze_threshold = 50
F autovacuum_vacuum_cost_delay = 10
F autovacuum_vacuum_cost_limit = -1
F autovacuum_vacuum_scale_factor = 0.1
F autovacuum_vacuum_threshold = 50
To swap profiles, we would simply do the following actions:
 
Search WWH ::




Custom Search