Re: pgbench

From: Giuseppe Broccolo <giuseppe(dot)broccolo(at)2ndquadrant(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: pgbench
Date: 2013-10-03 14:57:49
Message-ID: 524D85ED.3020401@2ndquadrant.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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(dot)broccolo(at)2ndQuadrant(dot)it | www.2ndQuadrant.it

In response to

Responses

  • Re: pgbench at 2013-10-03 15:50:55 from Alvaro Herrera

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2013-10-03 15:00:07 Re: pgbench
Previous Message saritha N 2013-10-03 14:57:21 Re: Unable to convert xpath value to date