On Mon, Oct 19, 2020 at 2:37 PM tsunakawa.ta...@fujitsu.com <tsunakawa.ta...@fujitsu.com> wrote: > > Really. I thought we were talking about canceling commits with Ctrl + C as > you referred, right? I couldn't imagine, in production environments where > many sessions are running transactions concurrently, how the user (DBA) > wants and can cancel each stuck session during commit one by one with Ctrl + > C by hand. I haven't seen such a feature exist or been considered crucial > that enables the user (administrator) to cancel running processing with Ctrl > + C from the side.
Using pg_cancel_backend() and pg_terminate_backend() a DBA can cancel running query from any backend or terminate a backend. For either to work the backend needs to be interruptible. IIRC, Robert had made an effort to make postgres_fdw interruptible few years back. -- Best Wishes, Ashutosh Bapat