Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > pgbench minor f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 3867 of 4084
Post > Topic >>

pgbench minor fixes

by simon@[EMAIL PROTECTED] (Simon Riggs) Jul 5, 2008 at 02:03 PM

--=-0F0xAHtwjp8OE52tDCci
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

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 Sup****t

--=-0F0xAHtwjp8OE52tDCci
Content-Disposition: attachment; filename=pgbench_minor.v1.patch
Content-Type: text/x-patch; name=pgbench_minor.v1.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

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)

--=-0F0xAHtwjp8OE52tDCci
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


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

--=-0F0xAHtwjp8OE52tDCci--
 




 6 Posts in Topic:
pgbench minor fixes
simon@[EMAIL PROTECTED]   2008-07-05 14:03:47 
Re: pgbench minor fixes
mr-russ@[EMAIL PROTECTED]  2008-07-06 00:06:07 
Re: pgbench minor fixes
gsmith@[EMAIL PROTECTED]   2008-07-05 10:48:55 
Re: pgbench minor fixes
simon@[EMAIL PROTECTED]   2008-07-05 16:45:00 
Re: pgbench minor fixes
tgl@[EMAIL PROTECTED] (T  2008-07-06 01:53:20 
Re: pgbench minor fixes
bruce@[EMAIL PROTECTED]   2008-08-22 13:57:48 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 6:13:08 CDT 2008.