Disconnected but query still running

Поиск
Список
Период
Сортировка
От Eduardo Piombino
Тема Disconnected but query still running
Дата
Msg-id CAGHqW79FaxSNOrHcZicEv+eDSA+rDTYo=Z_LDUAJ2tx4YLu1=w@mail.gmail.com
обсуждение исходный текст
Ответы Re: Disconnected but query still running  (Venkata Balaji N <nag1010@gmail.com>)
Re: Disconnected but query still running  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-general
Hi, list.
I've been running a query from pgAdmin for a couple of hours, just to
realize that the pgAdmin timer that counts ellapsed time had stopped,
but the status bar still said "executing". So I first thought it
could've been some kind of bug with the counter. However, after some
more time, I found that a popup telling me that the connection had
been reset (the timer had stopped almost exactly at 2 hours, 7.210.123
ms to be exact, which makes me think of a 2 hours timeout somewhere).
So I closed the dialog, and then it told me that the connection had
been reset. Ok, status was updated to connection reset, but the query
was (actually is) still running, despite the disconnection (it's still
hammering the disk, and it shows up in one of the pg_views showing
running quesries).

I've read that that a query still running after a disconnection is
normal, since the server won't realize about this disconnection until
it needs to send some data back to the client, which is ok and
understandable. But my question is, what happens when the query
finishes? FYI, the query was an update, in what would be autocommit
mode (no explicit transaction was open). Will the changes be commited?
or rollbacked because it will detect the disconnection later on? In
other words, is it worth waiting for this query to finish (it has been
running for almost 7 hours now), or should I cancel it because it will
irremediably be rolled back when the server finds theres no one on the
other end of the tcp connection?

Thanks.
Eduardo


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: How to test SSL cert from CA?
Следующее
От: "Charles Clavadetscher"
Дата:
Сообщение: Row level security - notes and questions