Re: psql not responding to SIGINT upon db reconnection

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Tristan Partin" <tristan(at)neon(dot)tech>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql not responding to SIGINT upon db reconnection
Date: 2023-07-24 17:43:56
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

"Tristan Partin" <tristan(at)neon(dot)tech> writes:
> v3 is attached which fixes up some code comments I added which I hadn't
> attached to the commit already, sigh.

I don't care for this patch at all. You're bypassing the pqsignal
abstraction layer that the rest of psql goes through, and the behavior
you're implementing isn't very nice. People do not expect ^C to
kill psql - it should just stop the \c attempt and leave you as you

Admittedly, getting PQconnectdbParams to return control on SIGINT
isn't too practical. But you could probably replace that with a loop
around PQconnectPoll and test for CancelRequested in the loop.

regards, tom lane

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-07-24 17:53:28 Removing the fixed-size buffer restriction in hba.c
Previous Message Jeff Davis 2023-07-24 17:36:25 Re: Use of additional index columns in rows filtering