Long Query and User Session

Lists: pgsql-general
From: durumdara <durumdara(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Long Query and User Session
Date: 2011-06-29 18:17:04
Message-ID: 4E0B6C20.10906@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-general

Hi!

I want to ask that what happens if a long query running and user session
timeout reached?

1.)

For example: somebody starts a very long query or statistical stored
procedure.

The session timeout is 5 minutes, and the session exhausted this time.

What happens?

a.)
The Query/STP automatically aborted by PGSQL, the resources released.

b.)
The Query/STP continue working
b1)
For unlimited time (while it reach the end of Qry/STP)
b2)
For limited time by a system parameter (max_query_running_time)
but user is locked out from session.

c.)
The Query/STP working time is make the session alive, it is defined as
"user interaction too", so the session ended on Qry/STP end + 5 minutes.

2.)
Another question based on this that can I force PGSQL server to abort
and release a session that got infinite loop (as admin, to close any
session?)?

3.)
What happens if the client is disconnecting (the program died, or
network connection died) while Query/STP running?

4.)
And: is PGSQL supports "aborting" of the long Query basically?

Thanks for your help:
dd