Re: pgbench -f and vacuum

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tatsuo Ishii <ishii(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pgbench -f and vacuum
Date: 2014-12-13 22:10:44
Message-ID: CAApHDvpLk2+E7dV+3Oiwc-J12wrrJMDx2MSyUkdroXuNF_-fVQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 14 December 2014 at 04:39, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Tatsuo Ishii <ishii(at)postgresql(dot)org> writes:
> > Currently pgbench -f (run custom script) executes vacuum against
> > pgbench_* tables before stating bench marking if -n (or --no-vacuum)
> > is not specified. If those tables do not exist, pgbench fails. To
> > prevent this, -n must be specified. For me this behavior seems insane
> > because "-f" does not necessarily suppose the existence of the
> > pgbench_* tables. Attached patch prevents pgbench from exiting even
> > if those tables do not exist.
>
> I don't particularly care for this approach. I think if we want to
> do something about this, we should just make -f imply -n. Although
> really, given the lack of complaints so far, it seems like people
> manage to deal with this state of affairs just fine. Do we really
> need to do anything?
>
>
>
I also find this weird vacuum non existing tables rather bizarre. I think
the first time I ever used pgbench I was confronted by the pgbench* tables
not existing, despite the fact that I was trying to run my own script.
Looking at --help it mentioned nothing about the pgbench_* tables, so I was
pretty confused until I opened up the online docs.

I'm not really a fan of how this is done in the proposed patch, I'd vote
for either skipping vacuum if -f is specified, or just doing a database
wide vacuum in that case. Though, that might surprise a few people, so
maybe the first option is better.

Regards

David Rowley

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2014-12-13 23:16:29 Re: CINE in CREATE TABLE AS ... and CREATE MATERIALIZED VIEW ...
Previous Message Andreas Karlsson 2014-12-13 20:45:54 PATCH: Reducing lock strength of trigger and foreign key DDL