Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Peter Eisentraut" <peter(at)eisentraut(dot)org>
Cc: "Heikki Linnakangas" <hlinnaka(at)iki(dot)fi>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org>, "Jacob Champion" <jacob(dot)champion(at)enterprisedb(dot)com>
Subject: Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore
Date: 2026-11-04 21:38:37
Message-ID: DMMR2GE6N0IY.284OI90NLICN4@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, 4 Nov 2026 at 12:08, Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> If we want to make this behavior change, then this might be better done
> as a separate patch before the refactoring.

Agreed. I had somehow missed that there were different sigjump targets
and not all of them set the cancel_requested flag. Attached is a new
patchset with this behaviour change done first explicitely. Because I
agree it's a bug that Ctrl+C in a promt doesn't stop the script.

Attachment Content-Type Size
v13-0001-psql-Stop-scripts-on-Ctrl-C-while-waiting-for-CO.patch text/x-patch 2.4 KB
v13-0002-psql-Replace-cancel_pressed-with-CancelRequested.patch text/x-patch 22.1 KB
v13-0003-fe_utils-Simplify-cancel-logic-in-wait_on_slots.patch text/x-patch 7.5 KB
v13-0004-Move-Windows-pthread-compatibility-functions-to-.patch text/x-patch 2.8 KB
v13-0005-Don-t-use-deprecated-and-insecure-PQcancel-psql-.patch text/x-patch 42.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jelte Fennema-Nio 2026-11-04 21:39:42 Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore
Previous Message Narek Galstyan 2026-11-04 21:30:30 Re: Unlogged bloom indexes break after crash recovery