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

From Tatsuo Ishii
Subject Re: pgbench -f and vacuum
Date
Msg-id 20141223.083125.1266740304251422148.t-ishii@sraoss.co.jp
Whole thread Raw
In response to Re: pgbench -f and vacuum  (Tomas Vondra <tv@fuzzy.cz>)
Responses Re: pgbench -f and vacuum  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
> First of all - I'm not entirely convinced the "IF EXISTS" approach is
> somehow better than "-f implies -n" suggested before, but I don't have a
> strong preference either.

I revisited the "-f implies -n" approach again. The main reason why I
wanted to avoid the approach was, it breaks the backward
compatibility. However if we were not going to back port the patch,
the approach is simpler and cleaner from the point of code
organization, I think (the patch I posted already make it impossible
to back port because to_regclass is used) .

However there's another problem with the approach. If we want to use
-f *and* run vacuum before testing, currently there's no way to do
it. "-v" might help, but it runs vacuum against pgbench_accounts
(without -v, pgbench runs vacuum against pgbench_* except
pgbench_accounts). To solve the problem, we would need to add opposite
option to -n, "run VACUUM before tests except pgbench_accounts"
(suppose the option be "-k"). But maybe someone said "why don't we
vacuum always pgbench_accounts? These days machines are pretty fast
and we don't need to care about it any more."

So my questions are:

1) Which approach is better "IF EXISTS" or "-f implies -n"?

2) If latter is better, do we need to add "-k" option? Or it's not  worth the trouble?
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_upgrade needs postmaster [sic]
Next
From: Andrew Gierth
Date:
Subject: Re: Final Patch for GROUPING SETS