Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRkJt-0006kh-F9 for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2013 14:56:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VRkJs-0003KY-Ow for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2013 14:56:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRkJr-0003KP-EN for pgsql-general@postgresql.org; Thu, 03 Oct 2013 14:55:59 +0000 Received: from mail01.pnet.xcon.it ([62.48.53.71]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRkJl-0000vw-WC for pgsql-general@postgresql.org; Thu, 03 Oct 2013 14:55:56 +0000 Received: from localhost (av.pnet.xcon.it [10.68.1.18]) by mail01.pnet.xcon.it (Postfix) with ESMTP id 2BD70301D7940 for ; Thu, 3 Oct 2013 16:55:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at av Received: from mail01.pnet.xcon.it ([10.68.1.19]) by localhost (av.pnet.xcon.it [10.68.1.18]) (amavisd-new, port 10024) with LMTP id 8XurIUp1lNdp for ; Thu, 3 Oct 2013 16:55:05 +0200 (CEST) Received: from bnc1.pnet.xcon.it (bnc1.pnet.xcon.it [10.68.1.23]) by mail01.pnet.xcon.it (Postfix) with ESMTP id 0F6B1301D71A3 for ; Thu, 3 Oct 2013 16:55:52 +0200 (CEST) Received: from localhost (av.pnet.xcon.it [10.68.1.18]) by bnc1.pnet.xcon.it (Postfix) with ESMTP id 0912C1022D8F for ; Thu, 3 Oct 2013 16:55:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at av Received: from bnc1.pnet.xcon.it ([10.68.1.23]) by localhost (av.pnet.xcon.it [10.68.1.18]) (amavisd-new, port 10024) with LMTP id kx6zKiwoQW3Q for ; Thu, 3 Oct 2013 16:55:02 +0200 (CEST) Received: from [192.168.0.144] (unknown [83.149.163.202]) (Authenticated sender: giuseppe.broccolo@2ndquadrant.it) by bnc1.pnet.xcon.it (Postfix) with ESMTPSA id 962D71022D8E for ; Thu, 3 Oct 2013 16:55:49 +0200 (CEST) Message-ID: <524D85ED.3020401@2ndquadrant.it> Date: Thu, 03 Oct 2013 16:57:49 +0200 From: Giuseppe Broccolo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: pgsql-general@postgresql.org Subject: Re: pgbench References: <524D7668.4050301@gmail.com> <57c75d91fcc3d9ccc3a928548b6d24a9@mailserver.grupoincofisa.com> In-Reply-To: <57c75d91fcc3d9ccc3a928548b6d24a9@mailserver.grupoincofisa.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org Il 03/10/2013 16:11, Simeó Reig ha scritto: > A 2013-10-03 15:51, Adrian Klaver escrigué: >> On 10/03/2013 06:21 AM, Simeó Reig wrote: >>> Hello >>> >>> I was doing a performance test with pgbench with a pretty long >>> queries >>> and I have the next error: >>> >>> $ pgbench -n -c1 -T 3 -f veins_pgbench.sql pdn >>> Client 0 aborted in state 0: ERROR: syntax error at end of input >>> LINE 1: ...(abc.persones.provincia = abc.poblacions.cod_provinc >>> ^ >>> transaction type: Custom query >>> scaling factor: 1 >>> query mode: simple >>> number of clients: 1 >>> number of threads: 1 >>> duration: 3 s >>> number of transactions actually processed: 0 >>> tps = 0.000000 (including connections establishing) >>> tps = 0.000000 (excluding connections establishing) >>> >>> I believe pgbench has a very low limit with the queries you can put >>> inside a file with the 't' option. >>> Am I right? How can avoid it ? >> >> >> Well first you say 't' option but show 'T' option, they are different. >> >> Second the error is reporting a syntax error in your script, so I >> would look there first. > > Yes, I did I mistake. I would say 'f' option (file option) not 't' > option, sorry . But no, there is no mistake with the script, I can do: > > # psql -d pdn < veins_pgbench.sql > > and it works perfectly > > thanks Adrian, I'm almost sure that the problem is the query is too > long for pgbench (1600 characters) The format of the script file has to be one SQL command per line; multiline SQL commands are not supported, and empty lines are ignored. This could bring to errors. Could this be your case? Giuseppe. -- Giuseppe Broccolo - 2ndQuadrant Italy PostgreSQL Training, Services and Support giuseppe.broccolo@2ndQuadrant.it | www.2ndQuadrant.it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general