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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Don't use the deprecated and insecure PQcancel in our frontend tools anymore
Date: 2026-07-04 21:29:28
Message-ID: CAN4CZFN-=Am6qh26GPjzZWsQCm+VqE=byrwr=Q1vUVqS0gTCNA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

+void
+setup_cancel_handler(void (*signal_callback) (void),
+ void (*thread_callback) (void))
+{
+...
+ create_cancel_thread();
+ pqsignal(SIGINT, CancelSignalHandler);
+#endif
+}

Maybe this should have a doc comment explaining that this function
should only be called once (or alternatively, create_cancel_thread
should have a guard against repeated callers)?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2026-07-04 21:47:14 psql single-step mode woes
Previous Message Alexander Korotkov 2026-07-04 21:02:40 Re: SQL/JSON json_table plan clause