Fractions in GUC variables

Поиск
Список
Период
Сортировка
От John Gorman
Тема Fractions in GUC variables
Дата
Msg-id CALkS6B824HNOJzyXikSNpXnknGcPjb20jO4p1ByBQRKGYJPp_A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Fractions in GUC variables  (Michael Paquier <michael.paquier@gmail.com>)
Re: Fractions in GUC variables  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Re: Fractions in GUC variables  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Список 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.


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.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: alter user set local_preload_libraries.
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: Fractions in GUC variables