Rhhh Lin <ruanlinehan@hotmail.com> writes:
> So I decided to intervene and terminate some active sessions (Which were active and not waiting) which were all
queryingthis table with a similar query, by using pg_backend_terminate(pid). Some of these sessions were in an active
statefor a few days executing this query. However, the termination of the PIDs [The command succeeded and returned
't']hasnot closed down the sessions. They are still present, and still active and still executing. Those current
sessionsare for whatever reason completely "hung", locking out exclusive access to the table (from vacuum) and cannot
bekilled. I have not yet resorted to trying to kill the process PID's from the OS perspective. Instead, I will try to
schedulean outage over the next few days, restart the server, implement a vacuum execution and see where I am at then.
Well, that's pretty interesting in itself. Any chance of attaching to one
of those unkillable backends with gdb and getting a stack trace?
https://wiki.postgresql.org/wiki/Generating_a_stack_trace_of_a_PostgreSQL_backend
regards, tom lane
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general