Re: Backend message type 0x50 arrived while idle - Mailing list pgsql-general

From Tom Lane
Subject Re: Backend message type 0x50 arrived while idle
Date
Msg-id 14780.1039020048@sss.pgh.pa.us
Whole thread Raw
In response to Re: Backend message type 0x50 arrived while idle  (Doug McNaught <doug@mcnaught.org>)
List pgsql-general
Doug McNaught <doug@mcnaught.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

pgsql-general by date:

Previous
From: Joel Burton
Date:
Subject: Re: Create Timestamp From Date and Time AGAIN (REPOST)
Next
From: Tom Lane
Date:
Subject: Re: 7.3 no longer using indexes for LIKE queries