Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: Suspending SELECTs - Mailing list pgsql-performance

From Alessandro Baretta
Subject Re: Suspending SELECTs
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Suspending SELECTs  ("Craig A. James" <[email protected]>)
Responses Re: Suspending SELECTs
Re: Suspending SELECTs
Re: Suspending SELECTs
List pgsql-performance
Craig A. James wrote:
>
> Alessandro Baretta <[email protected]> writes:
>
> I think you're trying to do something at the wrong layer of your
> architecture.  This task normally goes in your middleware layer, not
> your database layer.

I am developing my applications in Objective Caml, and I have written the
middleware layer myself. I could easily implement a cursor-pooling strategy, but
there is no perfect solution to the problem of guaranteeing that cursors be
closed. Remember that web applications require the user to "open a session" by
connecting the appropriate HTTP resource, but users as never required to log
out. Hence, in order to eventually reclaim all cursors, I must use magical
"log-out detection" algorithm, which is usually implemented with a simple
timeout. This guarantees the required property of safety (the population of
cursors does not diverge) but does not guarantee the required property of
liveness (a user connecting to the application, who has opened a session but has
not logged out, and thus possesses a session token, should have access the
execution context identified by his token).

Alex



--
*********************************************************************
http://www.barettadeit.com/
Baretta DE&IT
A division of Baretta SRL

tel. +39 02 370 111 55
fax. +39 02 370 111 54

Our technology:

The Application System/Xcaml (AS/Xcaml)
<http://www.asxcaml.org/>

The FreerP Project
<http://www.freerp.org/>

pgsql-performance by date:

Previous
From: Michael Stone
Date:
Subject: Re: Suspending SELECTs
Next
From: Yantao Shi
Date:
Subject: wildcard search performance with "like"