Robert Haas wrote:
> On Mon, Dec 22, 2014 at 6:55 PM, Alvaro Herrera
> <alvhe...@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


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to