Re: When the Session ends in PGSQL?

From: Durumdara <durumdara(at)gmail(dot)com>
To: Bill Moran <wmoran(at)potentialtech(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: When the Session ends in PGSQL?
Date: 2011-06-30 15:24:11
Message-ID: BANLkTinKDpjc3Bf0yQGR=dLJpjoRSuD-VA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

2011/6/30 Bill Moran <wmoran(at)potentialtech(dot)com>:
> In response to Durumdara <durumdara(at)gmail(dot)com>:
>
> Session ends when the connection is terminated.  I.e., a PostgreSQL
> session is synonymous with a TCP connection (or domain socket in some
> cases).

In Windows OS what's this meaning?
I know there is a difference between Win's and Lin's TCP handling.

>
> There is no setting in PostgreSQL to pro-actively terminate connections.

Ok.

> Such an option wouldn't make any sense to include, if you ask me.

In EDB and FireBird we experienced that Timeout is good thing for
avoid the short net problems.
For example: many place they are using notebooks, and wifis.
If somebody get out the wifi area, lost the connection - but the wifi
CAN reactivate it when he/she is go again the needed place. And here
the DB service also can reactivate the Session in the background -
except the period exhaustion.

> I
> mean, if I open a psql and start a transaction, then get interrupted or
> have to spend some time researching something else before I can finish,
> the last thing I want is to come back to psql and find that my session
> was terminated and my in-progress data changes lost.

Maybe in PSQL, but not in client applications where users working, and
sometimes they are got some failures, like power, or blue screen, or
application dying.
They want to continue their's work, but when the locks/trs are
reamining they cannot do it.

>
> For your concern about dying applications, the OS will tear down the
> TCP/IP connection eventually, which will result in PG ending the
> session (rolling back and uncommitted transaction), so that approach
> doesn't really cause you problems there.

Uhhhhhh... This sounds awfully.

Is this meaning that I periodically lost my temp tables, locks,
transactions because of OS's network handling what is out of my
control?

It sounds horrible for me. When this thing happens commonly?

I must sure in my Session still alive, and to keeps my important temp
tables, locks, etc in safely place...

I will waiting for your answer.

Thanks:
dd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bill Moran 2011-06-30 15:39:55 Re: When the Session ends in PGSQL?
Previous Message Linos 2011-06-30 15:23:28 Re: question about query