pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-pointGUCs.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-pointGUCs.
Дата
Msg-id E1h33xk-0001Oi-H8@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/caf626b2cd471615914986f18282c03c8282a1f4

Modified Files
--------------
doc/src/sgml/config.sgml                      |  23 +-
doc/src/sgml/ref/create_table.sgml            |   2 +-
src/backend/access/common/reloptions.c        |   6 +-
src/backend/commands/vacuum.c                 |   4 +-
src/backend/postmaster/autovacuum.c           |  16 +-
src/backend/utils/init/globals.c              |   2 +-
src/backend/utils/misc/guc.c                  | 327 ++++++++++++++++----------
src/backend/utils/misc/postgresql.conf.sample |   2 +-
src/include/catalog/catversion.h              |   2 +-
src/include/miscadmin.h                       |   2 +-
src/include/postmaster/autovacuum.h           |   2 +-
src/include/utils/guc.h                       |   3 +-
src/include/utils/rel.h                       |   2 +-
src/test/regress/expected/guc.out             |  10 +-
src/test/regress/sql/guc.sql                  |   4 +-
15 files changed, 246 insertions(+), 161 deletions(-)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Disallow NaN as a value for floating-point GUCs.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix documentation on partitioning vs. foreign tables