Re: Is this a commit problem? - Mailing list pgsql-hackers

From markw@osdl.org
Subject Re: Is this a commit problem?
Date
Msg-id 200309251704.h8PH4U100833@mail.osdl.org
Whole thread Raw
In response to Re: Is this a commit problem?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 25 Sep, Tom Lane wrote:
> markw@osdl.org writes:
>> I've been observing a interesting behavior with our DBT-2 workload.
> 
> AFAICS the only possible explanation for this is that you aren't
> actually waiting for the first transaction to commit before you start
> the second one.  What is the client doing exactly to issue these
> queries?
> 
>             regards, tom lane

Basically 4 steps:

PQexec(dbc->conn, "BEGIN");
PQexec(dbc->conn, "DECLARE mycursor CURSOR FOR SELECT new_order(...)");
PQexec(dbc->conn, "FETCH ALL IN mycursor");
PQexec(dbc->conn, "COMMIT");


I take it PQexec() should wait until the COMMIT finishes?

Mark


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Is this a commit problem?
Next
From: Tom Lane
Date:
Subject: Re: Threads vs Processes