Thread: pgBench cannot use prepared statements and reconnections

pgBench cannot use prepared statements and reconnections

From
Josh Berkus
Date:
To wit:

[jberkus@pgx-test prepare]$ pgbench -c 4 -C -T 180 -l -r -M prepared bench
starting vacuum...end.
Client 1 aborted in state 7: ERROR:  prepared statement "P0_7" does not
exist
Client 0 aborted in state 7: ERROR:  prepared statement "P0_7" does not
exist
Client 3 aborted in state 7: ERROR:  prepared statement "P0_7" does not
exist
Client 2 aborted in state 7: ERROR:  prepared statement "P0_7" does not
exist
transaction type: TPC-B (sort of)

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com

Re: pgBench cannot use prepared statements and reconnections

From
Mark Kirkwood
Date:
On 01/08/13 10:08, Josh Berkus wrote:
>
> To wit:
>
> [jberkus@pgx-test prepare]$ pgbench -c 4 -C -T 180 -l -r -M prepared bench
> starting vacuum...end.
> Client 1 aborted in state 7: ERROR:  prepared statement "P0_7" does not
> exist
> Client 0 aborted in state 7: ERROR:  prepared statement "P0_7" does not
> exist
> Client 3 aborted in state 7: ERROR:  prepared statement "P0_7" does not
> exist
> Client 2 aborted in state 7: ERROR:  prepared statement "P0_7" does not
> exist
> transaction type: TPC-B (sort of)
>

Strange - work for me (9.4devel pulled just now).

Cheers

Mark

Re: pgBench cannot use prepared statements and reconnections

From
Mark Kirkwood
Date:
On 01/08/13 11:08, Mark Kirkwood wrote:
> On 01/08/13 10:08, Josh Berkus wrote:
>>
>> To wit:
>>
>> [jberkus@pgx-test prepare]$ pgbench -c 4 -C -T 180 -l -r -M prepared
>> bench
>> starting vacuum...end.
>> Client 1 aborted in state 7: ERROR:  prepared statement "P0_7" does not
>> exist
>> Client 0 aborted in state 7: ERROR:  prepared statement "P0_7" does not
>> exist
>> Client 3 aborted in state 7: ERROR:  prepared statement "P0_7" does not
>> exist
>> Client 2 aborted in state 7: ERROR:  prepared statement "P0_7" does not
>> exist
>> transaction type: TPC-B (sort of)
>>
>
> Strange - work for me (9.4devel pulled just now).
>
> Cheers
>
> Mark

Hmmm, apologies - actually it didn't - I read right past the text

ERROR:  prepared statement "P0_7" does not exist

Re: pgBench cannot use prepared statements and reconnections

From
Josh Berkus
Date:
On 07/31/2013 04:11 PM, Mark Kirkwood wrote:
> Hmmm, apologies - actually it didn't - I read right past the text
>
> ERROR:  prepared statement "P0_7" does not exist
>

Yah.  It's quite possible that the answer is to explicitly disallow this
-- the only reason I even tried it is that I was testing for a
PostgreSQL bug -- but we should fail gracefully, e.g. "Use of prepared
statements with pgbench requires persistent connections.  You may not
use the -C and -m prepared options together".

--
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com