From: | Sergey Belikov <belikov(at)bnl(dot)gov> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Threads in PSQL |
Date: | 2003-11-18 00:22:13 |
Message-ID: | 3FB96635.3020402@bnl.gov |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Tom Lane wrote:
>Sergey Belikov <belikov(at)bnl(dot)gov> writes:
>
>>... Each thread
>>creates it's own PGconn connection, and starts lo_export(conn, loid,
>>filename) procedure. The problem is: after starting 2-3 threads SELECT
>>query of the main program fails because "another command is already in
>>progress".
>>
>
>I'll bet lunch that you have not actually created a PGconn for each
>thread --- or else that one of the threads is using the wrong PGconn
>object.
>
> regards, tom lane
>
Hi Tom!
You won! The probelm was not PGConns, but my main thread - I'm using
non-blocking psql functions - I have to implement setQueryTimeout
mechanism myself because it is ignored (by now) by PSQL/ODBC driver. And
it looks like I was sending two queries without waiting while the first
one completes.
At least now my program works properly.
Thank you, Sergey.
From | Date | Subject | |
---|---|---|---|
Next Message | Sergey Belikov | 2003-11-18 01:01:05 | How can I check if table exists in DB? |
Previous Message | MaFa | 2003-11-17 23:34:24 | Re: about postmaster... |