Re: Socket (fd) to posters server getting closed. (libpq)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sudheer H R <sudheer(dot)hr(at)tekenlight(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Socket (fd) to posters server getting closed. (libpq)
Date: 2021-06-27 14:12:38
Message-ID: 3175544.1624803158@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Sudheer H R <sudheer(dot)hr(at)tekenlight(dot)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 retrieved from 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 receive data 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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2021-06-27 15:37:16 Re: Assertion on create index concurrently
Previous Message Sudheer H R 2021-06-27 14:02:06 Socket (fd) to posters server getting closed. (libpq)