Re: Online system & transactions

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Online system & transactions
Date: 2004-10-19 15:33:24
Message-ID: 20041019153324.GE3359@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)crankycanuck(dot)ca
In the future this spectacle of the middle classes shocking the avant-
garde will probably become the textbook definition of Postmodernism.
--Brad Holland

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Hicham G. Elmongui 2004-10-19 16:10:58 delayed input
Previous Message Tom Lane 2004-10-19 15:32:46 Re: code in docs gives me an error