Subject | Re: [Firebird-Architect] FB2, read-commited and blobs |
---|---|
Author | Vlad Horsun |
Post date | 2005-12-05T22:26:51Z |
> Vlad Horsun wrote:I think we shouldn't check a blob values against null. Example
> >>7) In garbage collection, notice whether the record has blobs. If so,
> >>check both oldest_active and oldest_blob before removing old versions.
> >
> >
> > I have a problem with implementation of this last step. Question is
> > when we can make such check ?
>
> An easy first approximation is to leave the record version if it has a
> non-null blob field. That would get the right answer consistently and
> allow a lot more garbage collection than we do now.
tx1 insert record with blob
tx1 commit
tx2 is a read-committed
tx2 read record and start to read blob
tx3 update record and set blob to null
tx3 commit
tx4 read record and must decide about garbage collection
At that point we have oldest_blob == 1. If tx4 check blob value in top record
version (made by tx3) it see null and decide to remove version made by tx1
and blob which tx2 is now reading
So we must leave all records with blob fields regardless of its values
> For the fullI don't know how we can change current implementation without big
> implementation, we'll have to make changes to vio and blb so the going
> and staying lists are compiled before anything is removed and the blobs
> can be checked.
performance loss but this is definitely not a today's question
Regards,
Vlad