Re: When the Session ends in PGSQL?

From: Durumdara <durumdara(at)gmail(dot)com>
To: Vincent de Phily <vincent(dot)dephily(at)mobile-devices(dot)fr>, pgsql-general(at)postgresql(dot)org
Subject: Re: When the Session ends in PGSQL?
Date: 2011-07-04 11:50:46
Message-ID: CAEcMXhmpdvcZofrD9G2Kd08weTmEJ9sD175eHYhXLMfVcMw9EQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ahoj!

2011/7/4 Vincent de Phily <vincent(dot)dephily(at)mobile-devices(dot)fr>:
> On Monday 04 July 2011 12:49:24 Durumdara wrote:
>> What happens with running statements and stored procs at Session's end?
>>
>> They will be aborted and destroyed, or they can continue the running?
>>
>> For example:
>> User X starts a long Query/STP.
>> But he is lost "in deep space" (like in "Space Oddity":
>> http://www.youtube.com/watch?v=rKE3FSPJu-4&feature=related)
>> The TCP connection aborted, then the Session is set to dead.
>> But I don't know what happens with this Query? Is it aborted by Server
>> or Running may infinitively?
>
> The running query will be rolled back when the session ends. Note that "when
> the session ends" must be understood from the server's point of view, not the
> client's.

As I understand you then running Queries forced to abort on the end of
Session and no more Query running over the session's ending point (or
after TCP connection broken).

>
> Temporary tables, prepared statements, and cursors (not an exhaustive list)
> will be destroyed too.
>
> Stored procedures will remain. Note that "stored procedures" in postgres are a
> bit different from what you may be used to in other dbs; while I assure you
> it's for the better, you might want to RTFM to avoid surprises.

Please explain a little this (Just 1-2 sentence please).
Or suggest me some info, if possible... :-) (Prayer) :-)
I want to know about differences.

Thanks for it!
dd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Vincent de Phily 2011-07-04 12:08:57 Re: When the Session ends in PGSQL?
Previous Message Vincent de Phily 2011-07-04 11:12:51 Re: When the Session ends in PGSQL?