I have a postgres select query that can not be stopped using the standard pg_cancel/pg_terminate commands. Both commands return true, but do nothing. The query has access share locks on hundreds of tables, making it impossible for our ETL's to create new partitions. Query is listed as active but we believe is simply waiting for a response from the worker node which will never be sent.
The database can not be brought down due to the nature of data ingestion. We do not have the ability to use TCP Spoofing to send a signal to the Coordinator as that has been blocked at the o/s level.
System details: Linux : Red Hat Enterprise Linux Server 7.4 (Maipo) Pg: 10.6 citus: 8.1.1
pg_stat_activity for query in question pgStat_activity
Our team has done the following:
- select pg_cancel_backend(30334);
- select pg_terminate_backend(30334);
At linux command prompt: kill 30334
Both queries return TRUE, the command line does nothing and the session persists Even if we were to attempt to stop the postgres database, we are afraid the system might wait on the query to finish.
Looking for suggestions that don't involve kill -9. Anyone come across this problem before?