pgbench minor fixes

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

pgbench minor fixes

Simon Riggs
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


--
Sent via pgsql-patches mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches

pgbench_minor.v1.patch (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: pgbench minor fixes

Russell Smith
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 ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
Reply | Threaded
Open this post in threaded view
|

Re: pgbench minor fixes

Greg Smith-12
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 [hidden email] http://www.gregsmith.com Baltimore, MD

--
Sent via pgsql-patches mailing list ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
Reply | Threaded
Open this post in threaded view
|

Re: pgbench minor fixes

Simon Riggs
In reply to this post by Russell Smith

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 ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
Reply | Threaded
Open this post in threaded view
|

Re: pgbench minor fixes

Tom Lane-2
Simon Riggs <[hidden email]> 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 ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
Reply | Threaded
Open this post in threaded view
|

Re: pgbench minor fixes

Bruce Momjian
In reply to this post by Simon Riggs

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 ([hidden email])
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-patches

--
  Bruce Momjian  <[hidden email]>        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 ([hidden email])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches