Re: Clients disconnect but query still runs

Поиск
Список
Период
Сортировка
От Nicolas
Тема Re: Clients disconnect but query still runs
Дата
Msg-id 081e9502-aca4-4747-b588-a0cfeb4f6ae3@26g2000yqk.googlegroups.com
обсуждение исходный текст
Ответ на Clients disconnect but query still runs  (Robert James <srobertjames@gmail.com>)
Ответы Re: Clients disconnect but query still runs
Список pgsql-general
On 27 juil, 21:49, t...@sss.pgh.pa.us (Tom Lane) wrote:
> Robert James <srobertja...@gmail.com> writes:
> > Hi.  I noticed that when clients (both psql and pgAdmin) disconnect or
> > cancel, queries are often still running on the server.  A few questions:
> > 1) Is there a way to reconnect and get the results?
>
> No.
>
> > 2) Is there a way to tell postgres to automatically stop all queries when
> > the client who queried them disconnects?
>
> No.
>
> > 3) Is there a way to see all queries whose clients have disconnected?
>
> No.

Ok then. Disconnection detection is hard.

Now, I'm in a situation where I have many "IDLE in transaction". I
spotted them myself. I could kill them, but that wouldn't prevent them
from happening again. In fact, it happens regularily.

Is there a way to get the list of SQL statements that were previously
executed as part of a given transaction?

If I could get that, it would be a hell lot easier to figure out the
misbehaving client.

Thanks for any pointers,

Nicolas


В списке pgsql-general по дате отправления:

Предыдущее
От: Raymond O'Donnell
Дата:
Сообщение: Re: Postgresql Backups
Следующее
От: decibel
Дата:
Сообщение: What happens when syslog gets blocked?