pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alessandro Baretta <a.baretta@barettadeit.com>
To: Craig A. James <cjames@modgraph-usa.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Suspending SELECTs
Date: Tue, 17 Jan 2006 21:06:53 +0100
Message-ID: <43CD4E5D.7060406@barettadeit.com> (raw)
In-Reply-To: <43CC0DDF.9080904@modgraph-usa.com>
References: <43CB71AC.20203@barettadeit.com>
	<9766.1137433907@sss.pgh.pa.us>
	<43CC0DDF.9080904@modgraph-usa.com>

Craig A. James wrote:
> 
> Alessandro Baretta <a.baretta@barettadeit.com> 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/;



view thread (29+ messages)  latest in thread

Message-ID: <43CD4E5D.7060406@barettadeit.com>
Permalink:  ../43CD4E5D.7060406@barettadeit.com/
Also on:    postgresql.org/message-id/43CD4E5D.7060406@barettadeit.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: a.baretta@barettadeit.com, cjames@modgraph-usa.com
  Subject: Re: Suspending SELECTs
  In-Reply-To: <43CD4E5D.7060406@barettadeit.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox