RE: [HACKERS] MVCC works in serialized mode! - Mailing list pgsql-hackers

From Hiroshi Inoue
Subject RE: [HACKERS] MVCC works in serialized mode!
Date
Msg-id 001b01be3890$9ad8d420$2801007e@cadzone.tpf.co.jp
Whole thread Raw
In response to Re: [HACKERS] MVCC works in serialized mode!  (Bruce Momjian <maillist@candle.pha.pa.us>)
List pgsql-hackers
> -----Original Message-----
> From: Bruce Momjian [mailto:maillist@candle.pha.pa.us]
> Sent: Wednesday, December 30, 1998 4:59 AM
> To: PostgreSQL-development
> Cc: Inoue@tpf.co.jp; vadim@krs.ru
> Subject: Re: [HACKERS] MVCC works in serialized mode!
> 
> 
> > > No time this year.
> > > If   necessary I will do it next year.
> > > 
> > > Thanks.
> > 
> > Yes.  I need to know if the code change between setitimer and select()
> > causes the difference you are seeing.
> 
> OK, I have re-coded that section.  I had majorly broken it.
> 
> As part of the fix, I changed the deadlock detection in include/config.h
> from 60 to 1.  Remember, config.h is generated from config.h.in.
> 
> Can you change it back to 60 to see that the timeout is working
> properly?  The one-second default is not going to be noticable during
> testing.
>

I changed DEADLOCK_CHECK_TIMER in config.h to 60 and compiled.
Deadlock check takes about 60 seconds.
So timeout is set to 60 properly.

And the result is as follows.

create table t1 (key int,a int);
insert into t1 values (1,1);

Session-1             Session-2

begin;                   begin;
BEGIN                  BEGIN
update t1 set a=1; 
UPDATE 1                                      update t1 set a=1;                           [ update is blocked ]
abort;
ABORT        [ immediately ]                           UPDATE 1

It's OK.

Thanks a lot.

Hiroshi Inoue
Inoue@tpf.co.jp


pgsql-hackers by date:

Previous
From: Angelos Karageorgiou
Date:
Subject: Re: [HACKERS] Still having trouble importing 6.3 DB
Next
From: Oleg Broytmann
Date:
Subject: Re: Date/time fixes for HAVE_TM_ZONE platforms