Re: psql not responding to SIGINT upon db reconnection

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Robert Haas" <robertmhaas(at)gmail(dot)com>, "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
Cc: "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>, "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgresql(dot)org>, "Shlok Kyal" <shlok(dot)kyal(dot)oss(at)gmail(dot)com>
Subject: Re: psql not responding to SIGINT upon db reconnection
Date: 2024-03-22 17:05:20
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Fri Mar 22, 2024 at 9:59 AM CDT, Robert Haas wrote:
> On Wed, Jan 31, 2024 at 1:07 PM Tristan Partin <tristan(at)neon(dot)tech> wrote:
> > 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.
> As Jelte said back at the end of January, I think you just completely
> missed it. The relevant part of libpq.sgml starts like this:
> <varlistentry id="libpq-PQsocket">
> <term><function>PQsocket</function><indexterm><primary>PQsocket</primary></indexterm></term>
> As far as I know, we document all of the exported libpq functions in
> that SGML file.
> I think there's no real reason why we couldn't get at least 0001 and
> maybe also 0002 into this release, but only if you move quickly on
> this. Feature freeze is approaching rapidly.
> Modulo the documentation changes, I think 0001 is pretty much ready to
> go. 0002 needs comments. I'm also not so sure about the name
> process_connection_state_machine(); it seems a little verbose. How
> about something like wait_until_connected()? And maybe put it below
> do_connect() instead of above.

Robert, Jelte:

Sorry for taking a while to get back to y'all. I have taken your
feedback into consideration for v9. This is my first time writing
Postgres docs, so I'm ready for another round of editing :).

Robert, could you point out some places where comments would be useful
in 0002? I did rename the function and moved it as suggested, thanks! In
turn, I also realized I forgot a prototype, so also added it.

This patchset has also been rebased on master, so the libpq export
number for PQsocketPoll was bumped.

Tristan Partin
Neon (

Attachment Content-Type Size
v9-0001-Expose-PQsocketPoll-for-frontends.patch text/x-patch 5.9 KB
v9-0002-Allow-SIGINT-to-cancel-psql-database-reconnection.patch text/x-patch 2.8 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Japin Li 2024-03-22 17:11:31 Re: Cannot find a working 64-bit integer type on Illumos
Previous Message Tom Lane 2024-03-22 17:04:40 Re: Cannot find a working 64-bit integer type on Illumos