a slightly stale comment - Mailing list pgsql-hackers

From Dan Ports
Subject a slightly stale comment
Date
Msg-id 20120307020501.GA70817@csail.mit.edu
Whole thread Raw
Responses Re: a slightly stale comment
List pgsql-hackers
While mucking around in src/backend/utils/time/tqual.c today, I noticed
the following comment attached to HeapTupleSatisfiesNow:
*      mao says 17 march 1993:  the tests in this routine are correct;*      if you think they're not, you're wrong,
andyou should think*      about it again.  i know, it happened to me.  we don't need to*      check commit time against
thestart time of this transaction*      because 2ph locking protects us from doing the wrong thing.*      if you mess
aroundhere, you'll break serializability.  the only*      problem with this code is that it does the wrong thing for
system*     catalog updates, because the catalogs aren't subject to 2ph, so*      the serializability guarantees we
providedon't extend to xacts*      that do catalog accesses.  this is unfortunate, but not critical.
 

Much as I hate to disturb a comment just before its 19th birthday, the
bit about two-phase locking and serializability hasn't been correct
since around 1999 (when MVCC was added). :-)

Dan

-- 
Dan R. K. Ports              MIT CSAIL                http://drkp.net/


pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Speed dblink using alternate libpq tuple storage
Next
From: Pavel Stehule
Date:
Subject: Re: poll: CHECK TRIGGER?