Re: vacuum, performance, and MVCC - Mailing list pgsql-hackers

From Greg Stark
Subject Re: vacuum, performance, and MVCC
Date
Msg-id 8764it2hwz.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: vacuum, performance, and MVCC  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: vacuum, performance, and MVCC  (Lukas Smith <smith@pooteeweet.org>)
Re: vacuum, performance, and MVCC  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: vacuum, performance, and MVCC  (Jim Nasby <jnasby@pervasive.com>)
List pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:

> The Oracle design has got other drawbacks: if you need to access a row
> version other than than the very latest, you need to go searching in the
> rollback segments for it.  This is slow (no index help) 

Just for the record, if i understood correctly -- this was all a bit black
magicky -- Oracle found the data in the rollback segment by storing a pointer
to it in the block header where the updated data is. Ie, it could jump
straight to the right place. Of course the record could have been updated
multiple times which would necessitate following a linked list of rollback
segment entries. And those are all random access reads though you could hope
it was mostly cached.

> and creates significant amounts of contention (since lots of processes are
> competing to touch the rollback segments). Plus there's the old bugaboo that
> long-running transactions require indefinite amounts of rollback space, and
> Oracle is apparently unable to enlarge that space on-the-fly. (This last
> seems like a surmountable problem, but maybe there is some non-obvious
> reason why it's hard.)

That was one of the biggest bugaboos with Oracle but I get the impression they
spent a lot of work improving it precisely because it was such a high profile
failure. I think it's basically impossible to get a good old 'Snapshot Too
Old' error now but I'm unclear how they achieved that. There must have been a
tradeoff somewhere.

There are other solutions too. I never used DB2 but I was led to believe they
used their transaction log to retrieve old versions of the records. Someone
else here claimed DB2 didn't implement MVCC at all so perhaps that's wrong
though.

-- 
greg



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: vacuum, performance, and MVCC
Next
From: Tom Lane
Date:
Subject: Re: xlog viewer proposal