RE: [HACKERS] MVCC works in serialized mode!

Hiroshi Inoue <inoue@tpf.co.jp>

From: "Hiroshi Inoue" <Inoue@tpf.co.jp>
To: "Vadim Mikheev" <vadim@krs.ru>
Cc: <hackers@postgreSQL.org>
Date: 1998-12-25T06:09:04Z
Lists: pgsql-hackers
> -----Original Message-----
> From: root@dune.krs.ru [mailto:root@dune.krs.ru]On Behalf Of Vadim
> Mikheev
> Sent: Friday, December 25, 1998 2:40 PM
> To: Hiroshi Inoue
> Cc: hackers@postgreSQL.org
> Subject: Re: [HACKERS] MVCC works in serialized mode!
>
>
> Hiroshi Inoue wrote:
> >
> > >
> > > CVS is just updated...
> > >
> > > Please try concurrent writes/reads...
> > >
> >
> > I happend to enjoy MVCC a little in (v6.4.1) .
> >
> > Readers are never blocked and writers are blocked only by
> > same row writers as I expected.
> > It's so comfortable.
> >
> > But I have a question.
> > Once transactions are blocked,it takes so long time to resume
> > after blocks were removed.
> > Why ?
> > Currently blocked transactions resume immediately after blocks
> > were removed.
>
> What do you mean?
> Example please...
>

inoue=> create table t1 (key int,a int);
inoue=> insert into t1 values (1,0);

<Session-1>                                          <Session-2>

inoue=> begin;                                       inoue=> begin;
BEGIN                                                   BEGIN
inoue=> update t1 set a=1 where key=1;
UPDATE 1
                                                            inoue=> update
t1 set a=2 where key=1;


                                                                 [ blocked ]
inoue=> end/abort;
END/ABORT
                                                                   [ after
long time .... ]
                                                            ERROR:  Can't
serialize access due to concurrent update
                                                            / UPDATE 1


Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp