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

From: David Raymond <David(dot)Raymond(at)tomtom(dot)com>
To: "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: RE: BUG #16145: Not able to terminate active session
Date: 2019-12-03 17:00:42
Message-ID: VI1PR07MB6029AC4C84FC03CF8E5CB4F487420@VI1PR07MB6029.eurprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2019-12-03 17:07:04 Re: BUG #16104: Invalid DSA Memory Alloc Request in Parallel Hash
Previous Message Tom Lane 2019-12-03 16:57:57 Re: pg_dump losing index column collations for unique and primary keys