Subject | Re: Question about Record Versioning??? |
---|---|
Author | Ali Gökçen |
Post date | 2005-04-21T08:38:45Z |
Thank you very much Ann.
There is a statement in Turkish:
"It is not enough, if it is not more than enough!"
Regards,
Ali
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
There is a statement in Turkish:
"It is not enough, if it is not more than enough!"
Regards,
Ali
--- In firebird-support@yahoogroups.com, "Ann W. Harrison"
<aharrison@i...> wrote:
> Allen wrote:failure.
> >
> > Can anyone please tell me when the firebird will keep the record
> > version?
>
> Firebird uses record versions in three ways:
>
> 1) to provide a stable snapshot of data.
> 2) to identify update conflicts between concurrent transactions
> 3) to replace the undo log for recovery after transaction
>3 is
> Although 1 and 2 are not of interest in a single user application,
> always required in a transaction-based system. So, the quickanswer, is
> that any modification or deletion creates a record version,regardless
> of transaction modes or number of concurrent users.that
>
> Record versions are removed after the end of the last transaction
> can read them. The actual mechanism depends on the architectureand
> version of Firebird. In V1.x, classic uses cooperative garbageFirebird2,
> collection and superserver uses a garbage collect thread. In
> classic is still cooperative and superserver uses a combination ofencounters
> cooperative and a garbage collect thread. In Vulcan, all modes use
> cooperative garbage collection.
>
> Cooperative garbage collection means that when a transaction
> a record with unneeded old versions, it immediately removes them.That
> is "unfair" in that a transaction that does a massive delete doesthe
> delete and moves on, leaving at least two record versions - thelast
> data and a stub record to say it was deleted - and all indexentries.
> When the delete is "mature", meaning that no running transactioncan see
> the old record, the next transaction to stumble over the recordmust
> remove the record versions and index entries. That can be quiteexpensive.
>a
> When the garbage collect thread is running, the transaction that
> stumbles over a record version that can be removed just puts it on
> list. When the garbage collect thread starts, it reads its listand
> removes all the unneeded record versions from all records on thepage.
> A problem occurs when the garbage collect thread doesn't getenough
> cycles and garbage starts building up. Then the system gets veryslow.
>garbage
> The garbage collection in V2 mixes cooperative and thread-based
> collection. If the record version can be removed conveniently -without
> reading any new pages, then the transaction that finds it removesit.
> Otherwise, it goes on a list for the garbage collect thread.
>
> More than you wanted to know...
>
> Regards,
>
>
> Ann