pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Sudheer H R <sudheer.hr@tekenlight.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: Socket (fd) to posters server getting closed. (libpq)
Date: Sun, 27 Jun 2021 10:12:38 -0400
Message-ID: <3175544.1624803158@sss.pgh.pa.us> (raw)
In-Reply-To: <B84343DA-1078-444D-B259-A2C7C3CC6242@tekenlight.com>
References: <B84343DA-1078-444D-B259-A2C7C3CC6242@tekenlight.com>

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 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





view thread (2+ messages)

Message-ID: <3175544.1624803158@sss.pgh.pa.us>
Permalink:  ../3175544.1624803158@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3175544.1624803158@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, sudheer.hr@tekenlight.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Socket (fd) to posters server getting closed. (libpq)
  In-Reply-To: <3175544.1624803158@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox