Thread: BUG #15003: pg_terminate_backend does not work
The following bug has been logged on the website: Bug reference: 15003 Logged by: Sigitas Vysniauskas Email address: sigutis@gmail.com PostgreSQL version: 9.6.5 Operating system: centos-release-7-4.1708.el7.centos.x86_64 Description: pg_terminate_backend returns true, but it does not terminates backend. pg_stat_activity: application_name - "pg_cron" client_addr - "::1" state - "active" query - "select sync_devices_run()" PostgreSQL 9.6.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit
On Thu, 11 Jan 2018 08:43:27 +0000 PG Bug reporting form <noreply@postgresql.org> wrote: > pg_terminate_backend returns true, but it does not terminates backend. > > query - "select sync_devices_run()" Does the function sync_devices_run() do any sort of IO other than database queries? pg_terminate_backend() can only terminate queries that are running postgresql code, so if the function is making a blocking system call for example, network IO pg_terminate_backend() can't do anything. -dg -- David Gould daveg@sonic.net If simplicity worked, the world would be overrun with insects.