Thanks Adrian and Tom. Tom wrote:
> > It's not entirely clear what your question is, but here are some possible > answers: > > 1. For quite some time now, the "query" column in pg_stat_activity has > been defined as "the query currently or most recently run by the session"; > it's intentional that it doesn't go back to "<idle>" anymore. You need to > look at the "state" column to tell whether the session is actively running > the query or not. > > 2. Are you sure that operating system user "crest" isn't connecting as > database user "postgres"? > > Yes. > 3. pg_cancel_backend() is only supposed to terminate the current query > (if any), not kill the session. If you want the latter try > pg_terminate_backend(). > > Thanks. I was under the wrong impression that pg_cancel_backend() will do both. That answers about all my questions. Regards Johann