Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHmEE-0001ux-Mu for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 05:06:02 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZHmED-0006UQ-Se for pgsql-hackers@arkaria.postgresql.org; Wed, 22 Jul 2015 05:06:01 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZHmEC-0006Sy-Hg for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 05:06:00 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZHmE8-0006hg-5B for pgsql-hackers@postgresql.org; Wed, 22 Jul 2015 05:05:58 +0000 Received: from cri.ensmp.fr (93-35-198-203.ip56.fastwebnet.it [93.35.198.203]) (authenticated bits=0) by boipeva.ensmp.fr (8.15.1/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id t6M55pXK011347 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 22 Jul 2015 07:05:52 +0200 Date: Wed, 22 Jul 2015 07:05:50 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Robert Haas cc: PostgreSQL Developers Subject: Re: pgbench stats per script & other stuff In-Reply-To: Message-ID: References: User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at boipeva.ensmp.fr with ID 55AF24AF.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 55AF24AF.000 from 93-35-198-203.ip56.fastwebnet.it/93-35-198-203.ip56.fastwebnet.it/93.35.198.203/cri.ensmp.fr/ X-Pg-Spam-Score: -3.1 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Hello Robert, >> Pgbench *currently* already accept multiple "-f ..." options, and this is a >> good thing to test realistic loads which may intermix several kind of >> transactions, say a lot of readonly and some update or insert, and very rare >> deletes... > > Hmm, I didn't realize that. The code looks a bit inconsistent right > now - e.g. we do support multiple files, but pgbench's options-parsing > loop sets ttype to a value that depends only on the last of -f, -N, > and -S encountered. Indeed. However as with current pgbench /-N/-S and -f are mutually exclusive it is ok to have ttype set as it is. With the patch pgbench just executes scripts and the options are not mutually exclusive: some scripts are internal and others are not, but they are treated the same beyond initialization, which helps removing some code including the "ttype" variable you mention. The name of the script is kept in an SQLScript struct along with its commands, weight and stats. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers