Re: Online system & transactions - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Online system & transactions
Date
Msg-id 20041019153324.GE3359@phlogiston.dyndns.org
Whole thread Raw
In response to Re: Online system & transactions  ("Lada 'Ray' Lostak" <ray@unreal64.net>)
List pgsql-general
On Tue, Oct 19, 2004 at 01:29:41PM +0200, Lada 'Ray' Lostak wrote:
> But this is normal 'transaction' - and I didn't find way, how can I 'store'
> transaction to disc storage and 'reopen' later.

That you can't do.  The usual recipe for this is something like
optimistic locking -- for instance, set an int8 column to
nextval() of some sequence, and then later, when you're ready to
commit, check to make sure the value hasn't changed and do all your
work in an SQL transaction.  If the value has changed anywhere, you
know you have to throw away the work you did (or present the
intermediate changes to the user, or whatever).

A

--
Andrew Sullivan  | ajs@crankycanuck.ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.
                --Brad Holland

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: code in docs gives me an error
Next
From: "Hicham G. Elmongui"
Date:
Subject: delayed input