pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Allow SIGINT to cancel psql database reconnections.
3+ messages / 3 participants
[nested] [flat]
* pgsql: Allow SIGINT to cancel psql database reconnections.
@ 2024-04-02 14:30 Robert Haas <rhaas@postgresql.org>
2024-04-02 21:40 ` Re: pgsql: Allow SIGINT to cancel psql database reconnections. Alexander Korotkov <aekorotkov@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Robert Haas @ 2024-04-02 14:30 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Allow SIGINT to cancel psql database reconnections.
After installing the SIGINT handler in psql, SIGINT can no longer cancel
database reconnections. For instance, if the user starts a reconnection
and then needs to do some form of interaction (ie psql is polling),
there is no way to cancel the reconnection process currently.
Use PQconnectStartParams() in order to insert a cancel_pressed check
into the polling loop.
Tristan Partin, reviewed by Gurjeet Singh, Heikki Linnakangas, Jelte
Fennema-Nio, and me.
Discussion: http://postgr.es/m/D08WWCPVHKHN.3QELIKZJ2D9RZ@neon.tech
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/cafe1056558fe07cdc52b95205588fcd80870362
Modified Files
--------------
src/bin/psql/command.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 71 insertions(+), 1 deletion(-)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow SIGINT to cancel psql database reconnections.
2024-04-02 14:30 pgsql: Allow SIGINT to cancel psql database reconnections. Robert Haas <rhaas@postgresql.org>
@ 2024-04-02 21:40 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-04-03 13:15 ` Re: pgsql: Allow SIGINT to cancel psql database reconnections. Robert Haas <robertmhaas@gmail.com>
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Korotkov @ 2024-04-02 21:40 UTC (permalink / raw)
To: Robert Haas <rhaas@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org
On Tue, Apr 2, 2024 at 5:30 PM Robert Haas <rhaas@postgresql.org> wrote:
> Allow SIGINT to cancel psql database reconnections.
>
> After installing the SIGINT handler in psql, SIGINT can no longer cancel
> database reconnections. For instance, if the user starts a reconnection
> and then needs to do some form of interaction (ie psql is polling),
> there is no way to cancel the reconnection process currently.
>
> Use PQconnectStartParams() in order to insert a cancel_pressed check
> into the polling loop.
>
> Tristan Partin, reviewed by Gurjeet Singh, Heikki Linnakangas, Jelte
> Fennema-Nio, and me.
>
> Discussion: http://postgr.es/m/D08WWCPVHKHN.3QELIKZJ2D9RZ@neon.tech
This appears to have missing pgindent.
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel&dt=2024-04-02%2021%3A19%3A02
------
Regards,
Alexander Korotkov
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow SIGINT to cancel psql database reconnections.
2024-04-02 14:30 pgsql: Allow SIGINT to cancel psql database reconnections. Robert Haas <rhaas@postgresql.org>
2024-04-02 21:40 ` Re: pgsql: Allow SIGINT to cancel psql database reconnections. Alexander Korotkov <aekorotkov@gmail.com>
@ 2024-04-03 13:15 ` Robert Haas <robertmhaas@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Robert Haas @ 2024-04-03 13:15 UTC (permalink / raw)
To: Alexander Korotkov <aekorotkov@gmail.com>; +Cc: pgsql-committers@lists.postgresql.org
On Tue, Apr 2, 2024 at 5:40 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:
> This appears to have missing pgindent.
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=koel&dt=2024-04-02%2021%3A19%3A02
Argh, sorry. I think someone else fixed this.
--
Robert Haas
EDB: http://www.enterprisedb.com
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-04-03 13:15 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-04-02 14:30 pgsql: Allow SIGINT to cancel psql database reconnections. Robert Haas <rhaas@postgresql.org>
2024-04-02 21:40 ` Alexander Korotkov <aekorotkov@gmail.com>
2024-04-03 13:15 ` Robert Haas <robertmhaas@gmail.com>
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