Sudheer H R <sudheer.hr@tekenlight.com> writes:
> I am writing a piece of software to connect to the Postgres database in the asynchronous manner and have used
PQconnectStartParams,PQsendPrepare, PQFlush , etc… in conjunction with libev.
> The established connection is used for a transaction, and then added to a pool of connections, and then subsequently
retrievedfrom the pool for reuse.
> I notice that the retrieved connection has the socket fd closed, which leads to an error o the nature: could not
receivedata from server: Bad file descriptor
libpq itself will assuredly never close a socket that's associated with
an open connection. You need to look elsewhere for the cause.
regards, tom lane