Thread: BUG #18734: pg_terminate_backend was unresponsive for processes with the status "active"

The following bug has been logged on the website:

Bug reference:      18734
Logged by:          Shawn C
Email address:      shawncarter@onboardeng.com
PostgreSQL version: 16.4
Operating system:   Amazon Linux AMI
Description:

pg_terminate_backend failed to terminate active queries on a materialized
view until an "idle in transaction" backend tied to the same view was
terminated.


PG Bug reporting form <noreply@postgresql.org> writes:
> pg_terminate_backend failed to terminate active queries on a materialized
> view until an "idle in transaction" backend tied to the same view was
> terminated.

Can't do much with this report if you don't give a full recipe for
reproducing it.

I guessed that the problem might be "the termination isn't effective
while the session is blocked on a lock", but in an experiment here
that worked for me.  So I have no idea what was happening in
your case.

            regards, tom lane



Hi,

On 2024-12-05 13:07:03 -0500, Tom Lane wrote:
> PG Bug reporting form <noreply@postgresql.org> writes:
> > pg_terminate_backend failed to terminate active queries on a materialized
> > view until an "idle in transaction" backend tied to the same view was
> > terminated.
> 
> Can't do much with this report if you don't give a full recipe for
> reproducing it.

In case a reproducer is not easily achievable, a backtrace showing where in
the code the unresponsive backend is, might suffice to identify the problem.


Greetings,

Andres Freund