Thread: Re: Multi-Versions and Vacuum -- cf Oracle & Vacuum alt

Re: Multi-Versions and Vacuum -- cf Oracle & Vacuum alt

From
Anthony Berglas
Date:
Thanks for doing the test in Oracle.  What I did not see is you setting the
Isolation Level.  Or maybe that is what I forgot to do when I did similar
tests some time ago!  (I don't have Oracle handy or I'd try again.)

However, the point remains, that there is no reason why PostgreSQL could not
provide more serialized transactions in Read Committed mode without taking
the hits with rollback that Serializable mode gives.

Anthony

PS. Any feedback on the idea of using the transaction log to implement MVC
would be appreciated.

>
> > ORACLE MVC
> >
> > Oracle definitely has MVC.  By default it is in Read
> Committed mode.  But
> > you can still get record locks in both Postgresql and
> Oracle if you Select
> > FOR UPDATE, which you must do in Read Committed mode to
> produce correct
> > transactions.

> I just tried this in Oracle 8.0.5:
>
> Session #1:
> ---------------
> SQL> select * from employees;
>
>         1 Tom
>         3 Jim
>
> So when you say:
>
> "By memory, Oracle has similar behaviour in Read Committed mode except
> that the PostCommitSelect would NOT show the changes made by session
> two, and thus be more serializable."
>
> it doesn't match the behavior with Oracle 8.0.5. Tom and Jim
> are phantom
> reads, as expected, in Read Committed mode. Perhaps this has
> changed in
> version 9?
>
> Mike Mascari
> mascarm@mascari.com
>

Re: Multi-Versions and Vacuum -- cf Oracle & Vacuum alt

From
Bruce Momjian
Date:
Anthony Berglas wrote:
> Thanks for doing the test in Oracle.  What I did not see is you setting the
> Isolation Level.  Or maybe that is what I forgot to do when I did similar
> tests some time ago!  (I don't have Oracle handy or I'd try again.)
>
> However, the point remains, that there is no reason why PostgreSQL could not
> provide more serialized transactions in Read Committed mode without taking
> the hits with rollback that Serializable mode gives.

Yes, we could probably do it, but it doesn't make sense for SELECT to
use SERIALIZABLE while in the same transaction UPDATE/DELETE is using
READ COMMITTED.  Seems that would cause all sorts of confusion.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026