pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-point GUCs.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-point GUCs.
Date: 2019-03-10 19:18:20
Message-ID: E1h33xk-0001Oi-H8@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2019-03-10 22:46:23 pgsql: Fix documentation on partitioning vs. foreign tables
Previous Message Tom Lane 2019-03-10 16:59:39 pgsql: Disallow NaN as a value for floating-point GUCs.