Den 2011-04-27 14:43 skrev [email protected] såhär:
> Hi
>
> discussion about http://tracker.firebirdsql.org/browse/CORE-2348
>
> I have solution for this problem reuse transaction id feature.
>
> When oldest active transaction id reach e.g. 1 500 000 001 value (shuld
> be big as possible but have also big difference to max integer value).
> then:
> 1. set "reset flag" of database to 1 and start speciall think of garbage
> collector
> remove all old record versions and also set transaction id flag for all
> others records (with transaction id flag less then or equal to 1 500 000
> 000) to value 1 500 000 000.
> 2. then server should look for time when 0 transactions are active.
> 3. then reset transaction counter to 0 also oldest active transaction
> value to 0 and set "reset flag" of database to 2
> 4. start another speciall think of garbage collector
> Should remove all record versions and leave only the most recent one
> with the largest value transaction id.
> 5. and reset transaction id flag for all record versions greater than or
> equal to 1 500 000 000 to 0 value.
>
> one more modification - code which get now most recent record versions
> should check if "reset flag"=2
> if yes then comparison of transaction id should be changed
> transaction id >=1 500 000 000 is older then transaction e.g. 203
>
> is this good solution or not?

I know too little about the internals of FB to be able to say if it 
would work, but would it actually be possible to run step 1 and 4 while 
the database is in active use? If not, then there are big problems.

Step 2 may be a big problem for 24/7 servers with many users active 
around the clock, but perhaps it would be enough to force all users out 
for just a second or two. This is not something that would have to be 
done very often so may be acceptable.

Also, I note that on large databases, step 1 and 4 might take days to 
execute. Problem?

Kjell
-- 
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: [email protected]
Telefon: 08-761 06 55
Mobil: 0733-44 24 64


------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to