pg.ddx.io  pgsql-patches@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Simon Riggs <simon@2ndquadrant.com>
To: List pgsql-patches <pgsql-patches@postgresql.org>
Subject: pgbench minor fixes
Date: Sat, 05 Jul 2008 14:03:47 +0100
Message-ID: <1215263027.4051.299.camel@ebony.site> (raw)

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)

view thread (6+ messages)  latest in thread

Message-ID: <1215263027.4051.299.camel@ebony.site>
Permalink:  ../1215263027.4051.299.camel@ebony.site/
Also on:    postgresql.org/message-id/1215263027.4051.299.camel@ebony.site

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-patches@postgresql.org
  Cc: simon@2ndquadrant.com
  Subject: Re: pgbench minor fixes
  In-Reply-To: <1215263027.4051.299.camel@ebony.site>
  References: <1215263027.4051.299.camel@ebony.site>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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