pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Vasily Kulikov <segoon@yandex-team.ru>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: PQconsumeinput() may close the fd
Date: Tue, 01 Nov 2022 11:09:44 +0300
Message-ID: <255131667290089@mail.yandex-team.ru> (raw)
In-Reply-To: <3198034.1666363228@sss.pgh.pa.us>
References: <53811666325878@mail.yandex-team.ru>
	<7e60d1a4a536a12fdd1c15caae93bac79b0ab8b1.camel@cybertec.at>
	<3198034.1666363228@sss.pgh.pa.us>

<div>21.10.2022, 17:40, "Tom Lane" &lt;tgl@sss.pgh.pa.us&gt;:</div><blockquote><p>Laurenz Albe &lt;<a href="mailto:laurenz.albe@cybertec.at" rel="noopener noreferrer">laurenz.albe@cybertec.at</a>&gt; writes:</p><blockquote> On Fri, 2022-10-21 at 07:27 +0300, Vasily Kulikov wrote:<blockquote> The problem is that sometimes PQconsumeInput() may close the connection</blockquote></blockquote><p>What I'd suggest doing is checking for PQstatus(conn) == CONNECTION_BAD,<br />or else directly rechecking PQsocket() each time, rather than assuming<br />the socket is still there.</p></blockquote><div>I've chosen this one. Thanks for the help!</div>





view thread (4+ messages)

Message-ID: <255131667290089@mail.yandex-team.ru>
Permalink:  ../255131667290089@mail.yandex-team.ru/
Also on:    postgresql.org/message-id/255131667290089@mail.yandex-team.ru

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: segoon@yandex-team.ru, tgl@sss.pgh.pa.us, laurenz.albe@cybertec.at
  Subject: Re: PQconsumeinput() may close the fd
  In-Reply-To: <255131667290089@mail.yandex-team.ru>
  References: <53811666325878@mail.yandex-team.ru> <7e60d1a4a536a12fdd1c15caae93bac79b0ab8b1.camel@cybertec.at> <3198034.1666363228@sss.pgh.pa.us> <255131667290089@mail.yandex-team.ru>

* 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