Re: psql not responding to SIGINT upon db reconnection

Tristan Partin <tristan@neon.tech>

From: "Tristan Partin" <tristan@neon.tech>
To: "Jelte Fennema-Nio" <postgres@jeltef.nl>
Cc: "Robert Haas" <robertmhaas@gmail.com>, "Heikki Linnakangas" <hlinnaka@iki.fi>, "Tom Lane" <tgl@sss.pgh.pa.us>, <pgsql-hackers@postgresql.org>, "Shlok Kyal" <shlok.kyal.oss@gmail.com>
Date: 2024-01-31T18:07:12Z
Lists: pgsql-hackers
On Tue Jan 30, 2024 at 4:42 PM CST, Jelte Fennema-Nio wrote:
> On Tue, 30 Jan 2024 at 23:20, Tristan Partin <tristan@neon.tech> wrote:
> > Not next week, but here is a respin. I've exposed pqSocketPoll as
> > PQsocketPoll and am just using that. You can see the diff is so much
> > smaller, which is great!
>
> The exports.txt change should be made part of patch 0001, also docs
> are missing for the newly exposed function. PQsocketPoll does look
> like quite a nice API to expose from libpq.

I was looking for documentation of PQsocket(), but didn't find any 
standalone (unless I completely missed it). So I just copied how 
PQsocket() is documented in PQconnectPoll(). I am happy to document it 
separately if you think it would be useful.

My bad on the exports.txt change being in the wrong commit. Git 
things... I will fix it on the next re-spin after resolving the previous 
paragraph.

-- 
Tristan Partin
Neon (https://neon.tech)



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix old, misleading comment for PGRES_POLLING_ACTIVE.

  2. Remove reachable call to pg_unreachable().

  3. Allow SIGINT to cancel psql database reconnections.

  4. Expose PQsocketPoll via libpq

  5. Fix query cancellation handling in psql