Re: [PATCHES] pgbench minor fixes
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 <[EMAIL PROTECTED]>http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches
Re: [PATCHES] pgbench minor fixes
Simon Riggs <[EMAIL PROTECTED]> 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 -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches
Re: [PATCHES] pgbench minor fixes
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 -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches
Re: [PATCHES] pgbench minor fixes
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 [EMAIL PROTECTED] http://www.gregsmith.com Baltimore, MD -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches
Re: [PATCHES] pgbench minor fixes
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. > > -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches
[PATCHES] pgbench minor fixes
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 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 - 1.80 --- contrib/pgbench/pgbench.c 5 Jul 2008 12:58:09 - *** *** 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) -- Sent via pgsql-patches mailing list (pgsql-patches@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-patches