From: | John Gorman <johngorman2(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Fractions in GUC variables |
Date: | 2014-12-07 19:48:24 |
Message-ID: | CALkS6B824HNOJzyXikSNpXnknGcPjb20jO4p1ByBQRKGYJPp_A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This patch implements the first wiki/Todo Configuration Files item
"Consider normalizing fractions in postgresql.conf, perhaps using '%'".
The "Fractions in GUC variables" discussion is here.
http://www.postgresql.org/message-id/467132CF.9020501@enterprisedb.com
This patch implements expressing GUC variables as percents in
postgresql.conf.
autovacuum_vacuum_scale_factor = 20% # percent of table size before vacuum
autovacuum_analyze_scale_factor = 10% # percent of table size before
analyze
As you can see the postgresql.conf file and the documentation read more
naturally. I added a regression test to guc.sql. The sql interface also
accepts both numeric and percent forms although the percent form must be
quoted because '%' is an operator.
show cursor_tuple_fraction; --> 10%
set cursor_tuple_fraction = .15; --> 15%
set cursor_tuple_fraction = '33%'; --> 33%
I tagged four configuration variables to display as percents.
The attached patch applies cleanly against master and passes all regression
tests including two new tests in guc.sql.
Attachment | Content-Type | Size |
---|---|---|
guc_percent-v1.patch | application/octet-stream | 13.8 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2014-12-07 20:58:08 | Re: Fractions in GUC variables |
Previous Message | Tom Lane | 2014-12-07 17:32:05 | Re: alter user set local_preload_libraries. |