Re: Choosing a Transaction Isolation Level

From: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>
To: Adam Sherman <adam(at)tritus(dot)ca>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Choosing a Transaction Isolation Level
Date: 2003-05-14 17:43:31
Message-ID: Pine.LNX.4.33.0305141139160.31454-100000@css120.ihs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, 14 May 2003, Adam Sherman wrote:

> How should one choose a Transaction Isolation Level?

So, read committed may return different data based on when you select, it,
while serializable will always return the same data. Further, concurrent
updates will not cause a read committed transaction to fail, but will
cause a serializable transaction to fail.

This means that in a read committed mode you MAY do an update on old data
that has changed in the database while you were running your transaction,
while serializable will fail and rollback it's transaction automatically,
thus forcing you to resubmit your transaction again.

This means read committed is easier to program in, but may result in some
data coherency issues, while serializable is more work, and tends to run
slower, but ensures your data is coherent as though each transaction ran
one at a time while all other transactions waited in line for it.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message scott.marlowe 2003-05-14 17:58:53 Re: Index Types
Previous Message scott.marlowe 2003-05-14 17:39:09 Re: Choosing a Transaction Isolation Level