Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRjiC-0005DC-Kc for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2013 14:17:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1VRjiC-0007Ha-0A for pgsql-general@arkaria.postgresql.org; Thu, 03 Oct 2013 14:17:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRjiA-0007HR-Vq for pgsql-general@postgresql.org; Thu, 03 Oct 2013 14:17:03 +0000 Received: from mail-pa0-x22f.google.com ([2607:f8b0:400e:c03::22f]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1VRji4-00009r-2N for pgsql-general@postgresql.org; Thu, 03 Oct 2013 14:17:02 +0000 Received: by mail-pa0-f47.google.com with SMTP id kp14so2666900pab.6 for ; Thu, 03 Oct 2013 07:16:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=RuVzuHE31pMoLMfTrV/5MMhb099M23YUmLHFgxMFYUU=; b=y9p0ztGHcb10JR+mlqlrRgANTpRDQjd//CMayQ/njBUK0Qgstgufsb8ILnnu3zYx0k 9z1bUkIJRM3O6Cjr5dk25ZqITj0wvcnljSb0ojI3ieCu0j2JNhShsGPhunR1ecHkQkzP pnwUG76ZpI4wWNEi1ijLQLob+5Pilz0UgZRowpaxcZ261gwZ4bciGtboJpC7uszXxJmZ KcdPk4vZg4IQFPyuH+WYJnBfgj2JSLB3LkSmX3pQbs8muqNh8Nd7NxWMPsZXkH5ygQSn kO+M/tpjDq++NUkteWYnLL5CS2PhnuP9WQfU3UEKozY4Sthjn2dXiHW1aXGCLTwAFBfU LtjQ== X-Received: by 10.68.170.225 with SMTP id ap1mr783269pbc.133.1380809814595; Thu, 03 Oct 2013 07:16:54 -0700 (PDT) Received: from [192.168.1.2] (65-102-181-223.tukw.qwest.net. [65.102.181.223]) by mx.google.com with ESMTPSA id b3sm8498010pbu.38.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Oct 2013 07:16:53 -0700 (PDT) Message-ID: <524D7C54.8070701@gmail.com> Date: Thu, 03 Oct 2013 07:16:52 -0700 From: Adrian Klaver User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: =?UTF-8?B?U2ltZcOzIFJlaWc=?= CC: 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: -2.0 (--) 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 On 10/03/2013 07:11 AM, Simeó Reig wrote: > 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) You have not shown the query, but could you be running into the belwo: http://www.postgresql.org/docs/9.3/interactive/pgbench.html "The format of a script file is one SQL command per line; multiline SQL commands are not supported. Empty lines and lines beginning with -- are ignored. Script file lines can also be "meta commands", which are interpreted by pgbench itself, as described below." > > Best regards > > Simeó Reig > Barcelona (Spain) > > > > -- Adrian Klaver adrian.klaver@gmail.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general