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

David Raymond <[email protected]>
Newsgroups gmane.comp.db.postgresql.bugs
Message-ID <VI1PR07MB6029AC4C84FC03CF8E5CB4F487420@VI1PR07MB6029.eurprd07.prod.outlook.com>
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
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.