Re: psql not responding to SIGINT upon db reconnection

From: "Tristan Partin" <tristan(at)neon(dot)tech>
To: "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>
Cc: "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: 2023-12-05 18:35:31
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Wed Nov 29, 2023 at 11:48 AM CST, Tristan Partin wrote:
> I am not completely in love with the code I have written. Lots of
> conditional compilation which makes it hard to read. Looking forward to
> another round of review to see what y'all think.

Ok. Here is a patch which just uses select(2) with a timeout of 1s or
pselect(2) if it is available. I also moved the state machine processing
into its own function.

Thanks for your comments thus far.

Tristan Partin
Neon (

Attachment Content-Type Size
v6-0001-Allow-SIGINT-to-cancel-psql-database-reconnection.patch text/x-patch 8.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-12-05 18:37:44 Remove WIN32 conditional compilation from win32common.c
Previous Message Robert Haas 2023-12-05 18:30:23 Re: backtrace_on_internal_error