Re: BUG #16145: Not able to terminate active session

Tomas Vondra <[email protected]>
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <20191203141147.lofq3gwn3u3vkkze@development>
On Tue, Dec 03, 2019 at 01:18:50PM +0000, PG Bug reporting form wrote:
>The following bug has been logged on the website:
>
>Bug reference:      16145
>Logged by:          MOHAN KUMAR DORAIRAJ
>Email address:      [email protected]
>PostgreSQL version: 11.2
>Operating system:   Red Hat Enterprise Linux Server release 7.6 (Maipo
>Description:
>
>Not able to terminate active session even though used below commands
>
>postgres=# SELECT pg_cancel_backend(16647);
> pg_cancel_backend
>-------------------
> t
>(1 row)
>
>postgres=# SELECT pg_terminate_backend(16647);
> pg_terminate_backend
>----------------------
> t
>(1 row)
>
>postgres=#  select pid,application_name FROM pg_stat_activity where
>application_name IS  NOT NULL AND state = 'active';
>  pid  |    application_name
>-------+------------------------
> 16647 | PostgreSQL JDBC Driver
> 19879 | psql
>

So what is happening in 16647? What query is it running? Can you attach
gdb to it and show us the backtrace?

It's probably running some CPU-intensive piece of code, not checking the
flags set by signal handlers, or something like that.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.