From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@postgresql.org
Subject: pgsql: Rationalize vacuuming options and parameters
Date: Wed, 18 Mar 2015 17:42:42 +0000
Message-ID: <E1YYHzO-00055Q-89@gemulon.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-committers>
Rationalize vacuuming options and parameters
We were involving the parser too much in setting up initial vacuuming
parameters. This patch moves that responsibility elsewhere to simplify
code, and also to make future additions easier. To do this, create a
new struct VacuumParams which is filled just prior to vacuum execution,
instead of at parse time; for user-invoked vacuuming this is set up in a
new function ExecVacuum, while autovacuum sets it up by itself.
While at it, add a new member VACOPT_SKIPTOAST to enum VacuumOption,
only set by autovacuum, which is used to disable vacuuming of the toast
table instead of the old do_toast parameter; this relieves the argument
list of vacuum() and some callees a bit. This partially makes up for
having added more arguments in an effort to avoid having autovacuum from
constructing a VacuumStmt parse node.
Author: Michael Paquier. Some tweaks by Álvaro
Reviewed by: Robert Haas, Stephen Frost, Álvaro Herrera
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/0d831389749a3baaced7b984205b9894a82444b9
Modified Files
--------------
src/backend/commands/analyze.c | 32 ++++-----
src/backend/commands/vacuum.c | 125 +++++++++++++++++++++++------------
src/backend/commands/vacuumlazy.c | 13 ++--
src/backend/nodes/copyfuncs.c | 4 --
src/backend/nodes/equalfuncs.c | 4 --
src/backend/parser/gram.y | 50 ++------------
src/backend/postmaster/autovacuum.c | 58 ++++++----------
src/backend/tcop/utility.c | 2 +-
src/include/commands/vacuum.h | 28 ++++++--
src/include/nodes/parsenodes.h | 13 +---
10 files changed, 159 insertions(+), 170 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
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: alvherre@alvh.no-ip.org
Subject: Re: pgsql: Rationalize vacuuming options and parameters
In-Reply-To: <E1YYHzO-00055Q-89@gemulon.postgresql.org>
References: <E1YYHzO-00055Q-89@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