Re: Beating Oracle

From: <jtv(at)xs4all(dot)nl>
To: <jtv(at)xs4all(dot)nl>
Cc: <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <bbadger(at)BadgerSE(dot)com>, <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: Beating Oracle
Date: 2002-03-01 16:40:52
Message-ID: 10489.195.212.29.99.1015000852.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

> The setup of Transactor encourages the programmer to put all
> "transient" state involved in the transaction inside the functor class
> as data members. If the connection is no longer there, for example,
> the framework tries to rerun the functor. It first restores the
> transaction's initial state simply by copy-constructing the functor
> object.

....And of course I should have added that the rerun involves setting up a
new back-end transaction (which is again handled by the framework).

I've considered special-case optimizations such as recording & replaying
SQL, but felt a bit out of my depth when trying to define (in reasonably
simple terms) when this would be safe. After all the client's transaction
may eg. read a record that another client may have modified between
retries. So I stuck with the more general solution of replaying the client
code, and coupling each attempt to its own backend transaction.

Of course this still doesn't let you do long transactions in an iffy
network environment. What it does buy you--I think--is the ability to keep
a connection open for a long time and running batches of smaller
transactions, without having to care (much) about temporary loss of
connection. From what I've seen, such loss typically occurs when the
connection is idle between transactions.

Jeroen

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Ivar Helbekkmo 2002-03-01 18:48:24 Re: Beating Oracle
Previous Message jtv 2002-03-01 16:28:07 Re: Beating Oracle