pg.ddx.io pgsql-patches@postgresql.org mailing list archive
help / color / mirror / Atom feedpgbench minor fixes
6+ messages / 5 participants
[nested] [flat]
* pgbench minor fixes
@ 2008-07-05 13:03 Simon Riggs <simon@2ndquadrant.com>
2008-07-05 14:06 ` Re: pgbench minor fixes Russell Smith <mr-russ@pws.com.au>
2008-08-22 17:57 ` Re: pgbench minor fixes Bruce Momjian <bruce@momjian.us>
0 siblings, 2 replies; 6+ messages in thread
From: Simon Riggs @ 2008-07-05 13:03 UTC (permalink / raw)
To: pgsql-patches
Minor patch on pgbench
1. -i option should run vacuum analyze only on pgbench tables, not *all*
tables in database.
2. pre-run cleanup step was DELETE FROM HISTORY then VACUUM HISTORY.
This is just a slow version of TRUNCATE HISTORY.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
Attachments:
pgbench_minor.v1.patch (text/x-patch, 1.4K) download
Index: contrib/pgbench/pgbench.c
===================================================================
RCS file: /home/sriggs/pg/REPOSITORY/pgsql/contrib/pgbench/pgbench.c,v
retrieving revision 1.80
diff -c -r1.80 pgbench.c
*** contrib/pgbench/pgbench.c 9 May 2008 15:53:07 -0000 1.80
--- contrib/pgbench/pgbench.c 5 Jul 2008 12:58:09 -0000
***************
*** 1080,1086 ****
/* vacuum */
fprintf(stderr, "vacuum...");
! executeStatement(con, "vacuum analyze");
fprintf(stderr, "done.\n");
PQfinish(con);
--- 1080,1089 ----
/* vacuum */
fprintf(stderr, "vacuum...");
! executeStatement(con, "vacuum analyze branches");
! executeStatement(con, "vacuum analyze tellers");
! executeStatement(con, "vacuum analyze accounts");
! executeStatement(con, "vacuum analyze history");
fprintf(stderr, "done.\n");
PQfinish(con);
***************
*** 1757,1764 ****
fprintf(stderr, "starting vacuum...");
executeStatement(con, "vacuum branches");
executeStatement(con, "vacuum tellers");
! executeStatement(con, "delete from history");
! executeStatement(con, "vacuum history");
fprintf(stderr, "end.\n");
if (do_vacuum_accounts)
--- 1760,1766 ----
fprintf(stderr, "starting vacuum...");
executeStatement(con, "vacuum branches");
executeStatement(con, "vacuum tellers");
! executeStatement(con, "truncate history");
fprintf(stderr, "end.\n");
if (do_vacuum_accounts)
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgbench minor fixes
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
@ 2008-07-05 14:06 ` Russell Smith <mr-russ@pws.com.au>
2008-07-05 14:48 ` Re: pgbench minor fixes Greg Smith <gsmith@gregsmith.com>
2008-07-05 15:45 ` Re: pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
1 sibling, 2 replies; 6+ messages in thread
From: Russell Smith @ 2008-07-05 14:06 UTC (permalink / raw)
To: Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-patches
Simon Riggs wrote:
> Minor patch on pgbench
>
> 1. -i option should run vacuum analyze only on pgbench tables, not *all*
> tables in database.
>
How does this work with custom scripts?
> 2. pre-run cleanup step was DELETE FROM HISTORY then VACUUM HISTORY.
> This is just a slow version of TRUNCATE HISTORY.
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgbench minor fixes
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
2008-07-05 14:06 ` Re: pgbench minor fixes Russell Smith <mr-russ@pws.com.au>
@ 2008-07-05 14:48 ` Greg Smith <gsmith@gregsmith.com>
1 sibling, 0 replies; 6+ messages in thread
From: Greg Smith @ 2008-07-05 14:48 UTC (permalink / raw)
To: Russell Smith <mr-russ@pws.com.au>; +Cc: pgsql-patches
On Sun, 6 Jul 2008, Russell Smith wrote:
> Simon Riggs wrote:
>> Minor patch on pgbench
>>
>> 1. -i option should run vacuum analyze only on pgbench tables, not *all*
>> tables in database.
>>
> How does this work with custom scripts?
That's the initialization step. It creates the 4 tables, populates then,
then runs VACCUM ANALYZE. There is no notion of what script you'll end up
executing yet. If you have a truly custom script that works against other
data instead of the pgbench tables, you won't even be executing this
initialization bit.
--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgbench minor fixes
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
2008-07-05 14:06 ` Re: pgbench minor fixes Russell Smith <mr-russ@pws.com.au>
@ 2008-07-05 15:45 ` Simon Riggs <simon@2ndquadrant.com>
2008-07-06 05:53 ` Re: pgbench minor fixes Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 6+ messages in thread
From: Simon Riggs @ 2008-07-05 15:45 UTC (permalink / raw)
To: Russell Smith <mr-russ@pws.com.au>; +Cc: pgsql-patches
On Sun, 2008-07-06 at 00:06 +1000, Russell Smith wrote:
> Simon Riggs wrote:
> > Minor patch on pgbench
> >
> > 1. -i option should run vacuum analyze only on pgbench tables, not *all*
> > tables in database.
> >
> How does this work with custom scripts?
I don't think we can justify vacuuming every table in the database just
so we get any tables being used for one set of tests. Not in a utility
that many users have access to, not just superusers. If you use a custom
script you just need to write a pre-test script and run it with psql.
--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgbench minor fixes
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
2008-07-05 14:06 ` Re: pgbench minor fixes Russell Smith <mr-russ@pws.com.au>
2008-07-05 15:45 ` Re: pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
@ 2008-07-06 05:53 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 6+ messages in thread
From: Tom Lane @ 2008-07-06 05:53 UTC (permalink / raw)
To: Simon Riggs <simon@2ndquadrant.com>; +Cc: Russell Smith <mr-russ@pws.com.au>; pgsql-patches
Simon Riggs <simon@2ndquadrant.com> writes:
> On Sun, 2008-07-06 at 00:06 +1000, Russell Smith wrote:
>> Simon Riggs wrote:
>>> 1. -i option should run vacuum analyze only on pgbench tables, not *all*
>>> tables in database.
>
>> How does this work with custom scripts?
> I don't think we can justify vacuuming every table in the database just
> so we get any tables being used for one set of tests.
Actually your point is that the -i option wouldn't be used anyway
with a custom script ...
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: pgbench minor fixes
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
@ 2008-08-22 17:57 ` Bruce Momjian <bruce@momjian.us>
1 sibling, 0 replies; 6+ messages in thread
From: Bruce Momjian @ 2008-08-22 17:57 UTC (permalink / raw)
To: Simon Riggs <simon@2ndquadrant.com>; +Cc: pgsql-patches
Committed, commit fest page updated.
---------------------------------------------------------------------------
Simon Riggs wrote:
> Minor patch on pgbench
>
> 1. -i option should run vacuum analyze only on pgbench tables, not *all*
> tables in database.
>
> 2. pre-run cleanup step was DELETE FROM HISTORY then VACUUM HISTORY.
> This is just a slow version of TRUNCATE HISTORY.
>
> --
> Simon Riggs www.2ndQuadrant.com
> PostgreSQL Training, Services and Support
[ Attachment, skipping... ]
>
> --
> Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-patches
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2008-08-22 17:57 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-07-05 13:03 pgbench minor fixes Simon Riggs <simon@2ndquadrant.com>
2008-07-05 14:06 ` Russell Smith <mr-russ@pws.com.au>
2008-07-05 14:48 ` Greg Smith <gsmith@gregsmith.com>
2008-07-05 15:45 ` Simon Riggs <simon@2ndquadrant.com>
2008-07-06 05:53 ` Tom Lane <tgl@sss.pgh.pa.us>
2008-08-22 17:57 ` Bruce Momjian <bruce@momjian.us>
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