| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Doug McNaught <doug(at)mcnaught(dot)org> |
| Cc: | "Wynn, Robin" <RWynn(at)northropgrumman(dot)com>, "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Backend message type 0x50 arrived while idle |
| Date: | 2002-12-04 16:40:48 |
| Message-ID: | 14780.1039020048@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Doug McNaught <doug(at)mcnaught(dot)org> writes:
> AFAIK it's extremely bad practice in general to share a connection
> between two threads, unless you protect it with some kind of lock to
> avoid simultaneous use.
I suspect Doug's put his finger on the problem --- are you trying to
use the same PGconn object in both threads? Not a good idea at all.
libpq isn't thread-aware (mainly because of the portability problems
that would ensue), and it *will* break if you try to use the same
PGconn concurrently in two different threads.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2002-12-04 16:50:42 | Re: 7.3 no longer using indexes for LIKE queries |
| Previous Message | Joel Burton | 2002-12-04 16:38:23 | Re: Create Timestamp From Date and Time AGAIN (REPOST) |