Re: Is this a commit problem?

From: markw(at)osdl(dot)org
To: tgl(at)sss(dot)pgh(dot)pa(dot)us
Cc: pgsql-hackers(at)postgresql(dot)org, osdldbt-general(at)lists(dot)sourceforge(dot)net
Subject: Re: Is this a commit problem?
Date: 2003-09-25 17:04:27
Message-ID: 200309251704.h8PH4U100833@mail.osdl.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 25 Sep, Tom Lane wrote:
> markw(at)osdl(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-09-25 17:07:41 Re: Is this a commit problem?
Previous Message Tom Lane 2003-09-25 17:03:02 Re: [HACKERS] Threads vs Processes