BUG #17181: pg_cancel_backend and pg_terminate_backend fail to work - Mailing list pgsql-bugs

From PG Bug reporting form
Subject BUG #17181: pg_cancel_backend and pg_terminate_backend fail to work
Date
Msg-id 17181-a35b7eaadcbaaa54@postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17181
Logged by:          Gregory Arenius
Email address:      gregory@arenius.com
PostgreSQL version: 11.12
Operating system:   Ubuntu 20.04
Description:

There are several long running queries in my database that I have tried to
shutdown manually using the pg_cancel_backend and pg_terminate_backend
functions.  The functions both return true but the queries are still
running.  The client that initiated the queries is not running.  The TCP
connections that the process was using are no longer open. pg_stat_activity
lists the queries as "active".  The queries are all using at least on
Foreign Data Wrapper based table.  When I killed the TCP connections to the
foreign server all of the queries finished.  I'm not sure how but I think
there is some sort of bug that is holding the TCP connection to the foreign
server open and that is not allowing the query to terminate.


pgsql-bugs by date:

Previous
From: Andriy Bartash
Date:
Subject: Re: BUG #17177: Secondary fails to start after upgrade from 13.3
Next
From: PG Bug reporting form
Date:
Subject: BUG #17182: Race condition on concurrent DROP and CREATE of dependent object