From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-point GUCs.
Date: Sun, 10 Mar 2019 19:18:20 +0000
Message-ID: <E1h33xk-0001Oi-H8@gemulon.postgresql.org> (raw)
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(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Convert [autovacuum_]vacuum_cost_delay into floating-point GUCs.
In-Reply-To: <E1h33xk-0001Oi-H8@gemulon.postgresql.org>
References: <E1h33xk-0001Oi-H8@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox