Re: duplicates

From: Tsirkin Evgeny <tsurkin(at)mail(dot)jct(dot)ac(dot)il>
To: Michael Paesold <mpaesold(at)gmx(dot)at>
Cc: pgsql-admin(at)postgresql(dot)org, eitanr(at)savion(dot)cc(dot)huji(dot)ac(dot)il
Subject: Re: duplicates
Date: 2004-09-06 10:56:49
Message-ID: Pine.LNX.4.58.0409061355030.20694@p-roman.jct.ac.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

You are greate Michael!
Thanks.

On Mon, 6 Sep 2004, Michael Paesold wrote:

> I wrote:
>
> > BEGIN;
> > SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
> >
> > DELETE FROM schedule WHERE studentid = ... ;
> > INSERT INTO schedule (studentid, ...) VALUES (... );
> > INSERT INTO schedule (studentid, ...) VALUES (... );
> >
> > COMMIT;
> >
> > If you do it like in the above sql code, there is still a problem. The
> > serializable checking here only works, if DELETE FROM schedule... really
> > finds at least one row. If it does not, it will not recognize the
> > serialization problem. So it's still possible that your programm creates
> > duplicates.
> >
> > I have tested this here. I don't really know if this is just the case with
> > PostgreSQL serializable transactions (MVCC limitation) or a general
> problem.
>
> There is a detailed description about this problem in Section 12.2.2.1. of
> the PostgreSQL 8 docs here:
> http://developer.postgresql.org/docs/postgres/transaction-iso.html
>
> (Serializable Isolation versus True Serializability)
>
> Best Regards,
> Michael Paesold
>

--
Evgeny.

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tsirkin Evgeny 2004-09-06 12:10:09 Re: duplicates
Previous Message Michael Paesold 2004-09-06 10:51:45 Re: duplicates