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