RE: BUG #16145: Not able to terminate active session - Mailing list pgsql-bugs

From David Raymond
Subject RE: BUG #16145: Not able to terminate active session
Date
Msg-id VI1PR07MB6029AC4C84FC03CF8E5CB4F487420@VI1PR07MB6029.eurprd07.prod.outlook.com
Whole thread Raw
In response to Re: BUG #16145: Not able to terminate active session  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Responses Re: BUG #16145: Not able to terminate active session  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
If you'll forgive a random question from an onlooker: Why did the functions return True if the process is still
ongoing?

https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-SIGNAL
"Each of these functions returns true if successful and false otherwise."

Is the definition of successful "the signal was sent" and not "the signal was actually received and did something"?


> But __read_nocancel suggests the process might be stuck in an I/O
> request, likely a network call to the Oracle. So maybe it's waiting for
> data from oracle_fdw, which means it can't cancel the query.


> 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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_dump losing index column collations for unique and primary keys
Next
From: Alvaro Herrera
Date:
Subject: Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash