Re: pgbench -f and vacuum - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: pgbench -f and vacuum
Date
Msg-id 20141223154247.GO1768@alvh.no-ip.org
Whole thread Raw
In response to Re: pgbench -f and vacuum  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pgbench -f and vacuum
Re: pgbench -f and vacuum
List pgsql-hackers
Robert Haas wrote:
> On Mon, Dec 22, 2014 at 6:55 PM, Alvaro Herrera
> <alvherre@2ndquadrant.com> wrote:
> > Here's a completely different idea.  How about we add an option that
> > means "vacuum this table before running the test" (can be given several
> > times); by default the set of vacuumed tables is the current pgbench_*
> > list, but if -f is specified then the default set is cleared.  So if you
> > have a -f script and want to vacuum the default tables, you're forced to
> > give a few --vacuum-table=foo options.  But this gives the option to
> > vacuum some other table before the test, not just the pgbench default
> > ones.
> 
> Well, really, you might want arbitrary initialization steps, not just
> vacuums.  We could have --init-script=FILENAME.

"Init" (pgbench -i) is the step that creates the tables and populates
them, so I think this would need a different name, maybe "startup," but
otherwise yeah.

> Although that might be taking this thread rather far off-topic.

Not really sure about that, because the only outstanding objection to
this discussion is what happens in the startup stage if you specify -f.
Right now vacuum is attempted on the standard tables, which is probably
not the right thing in the vast majority of cases.  But if we turn that
off, how do we reinstate it for the rare cases that want it?  Personally
I would just leave it turned off and be done with it, but if we want to
provide some way to re-enable it, this --startup-script=FILE gadget
sounds like a pretty decent idea.

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes
Next
From: Andres Freund
Date:
Subject: Re: [COMMITTERS] pgsql: Use a bitmask to represent role attributes