Skip site navigation (1) Skip section navigation (2)

Fractions in GUC variables

From: Heikki Linnakangas <heikki(at)enterprisedb(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Fractions in GUC variables
Date: 2007-06-14 12:21:35
Message-ID: (view raw or whole thread)
Lists: pgsql-hackers
We have these GUC variables that define a fraction of something:

#autovacuum_vacuum_scale_factor = 0.2	# fraction of rel size before
					# vacuum
#autovacuum_analyze_scale_factor = 0.1	# fraction of rel size before
					# analyze

#bgwriter_lru_percent = 1.0		# 0-100% of LRU buffers scanned/round
#bgwriter_all_percent = 0.333		# 0-100% of all buffers scanned/round

Autovacuum settings use fractions, and bgwriter settings use a 
percentage. Fortunately these settings are not related so there's not 
too much potential for confusion, but it seems we should have a common 
way to define settings like that.

A nice way would be that the base unit would be a fraction, like in the 
autovacuum settings, but you could add a %-sign to give it as a percent, 
just like you can use KB/MB etc. I'm not sure if we can do anything for 
those without breaking backwards-compatibility, though.

Any ideas? The load distributed checkpoints patch adds one more GUC 
variable like. I'm inclined to follow the example of the bgwriter 
settings because it's more closely related to them, though I like the 
autovacuum style more.

   Heikki Linnakangas


pgsql-hackers by date

Next:From: Joachim WielandDate: 2007-06-14 12:28:26
Subject: Re: ecpg regression broken on mingw
Previous:From: Andrew DunstanDate: 2007-06-14 12:17:05
Subject: Re: ecpg regression broken on mingw

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group