db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: puzzling command options for SYSCS_UTIL.SYSCS_INPLACE_COMPRESS_TABLE()
Date Tue, 01 May 2012 16:18:38 GMT

> Maybe, if there is some race condition. 199 pages are actually truncated
> from the file by the inplace compress. The size of the file remains
> constant after that, as the table fills up again. This takes a couple
> minutes. I would expect that the background worker would be able to get
> in sometime during that period.
> Thanks,
> -Rick
I have not had time to look at the dumps in the the bug.  The tricky 
part of shrinking the file is the alloc pages, and you mentioned some
wierdness with chain operations which deal with alloc pages.

Alloc pages are pages that are bit maps of the rest of the pages
in the file.  There is one in the beginning and has I think 3 bits
per page.  It tracks a number of pages that is dependent on the page
size.  Once file grows past that limit there is another alloc page
at that point, and the 2nd tracks more than the first as the first
one shares some file hdr info if i remember correctly.  This
continues with alloc pages inline within the table - I think they are
chained with page pointers and if so one bad pointer could cause a
lot of problems.  I would see
if the pages numbers of the alloc pages are close to the problem page
numbers of the bug and/or the places that you seem to be only to
shrink to.  suspicious would be 1 page before or after the alloc page.

It might help to make a real simple case and see if it repro's the
same thing you are seeing with the bug.  The simpler the test case
the easier the fix.  Something like single user:
o create table with a page size (if the bug is with alloc pages then 
making it be 2k pages probably makes it happen sooner)
o insert rows to grow to 42672128
o commit
o delete all rows
o commit
o wait for post commit
o inplace compress with just shrink option

View raw message