Topic Thread

Expand all | Collapse all

Minimum required free space in table/partition header during migration

  • 1.  Minimum required free space in table/partition header during migration

    Posted 21 days ago
    Hello

    Migration guides do not specify what is the minimum free space in partition header - migration guides  (to 12.10 and 14.10) mention that we need free space in header of each table during conversion otherwise conversion fails and you must unload data before migration, drop and create and load after migration but do not specify required minimum value, as they do for free space in DBspaces.
    Can we calculate the minimum somehow in order to check and correct if necessary before migration starts?

    ------------------------------
    Milan Rafaj
    ------------------------------


  • 2.  RE: Minimum required free space in table/partition header during migration

    Posted 20 days ago
    Edited by Andreas Legner 20 days ago
    Hi Milan,

    not trivial question, but nonetheless legitimate.

    It might be possible to come up with a sysmaster query for finding partitions having too little space left for an upgrade, i.e. ones with very full partition header pages (PHPs). An easier first approach would be determining if there are any low space PHPs at all:

    select partnum, pg_frcnt free_bytes
    from syspaghdr pg, sysptnhdr pt
    where pg_partnum = partnum
    and mod(partnum,1024*1024) = 1
    and bitand(pg_flags,255) = 2
    and pg_frcnt < 500
    order by 2;

    ... with the 500 bytes threshold chosen arbitrarily so far, to get a clue how many 'somewhat full' PHPs there are.

    The actual free space requirement depends on factors like
    • from-version and to-version
    • sizes of existing PHP slots

    Yet, there also is some extra good news:  since v12.10.xC12 and 14.10.xC1 you might not even have to bother about all this PHP free space subject during upgrade any more - the PHP's extent information (slot #5, quite typically the biggest one) can now be moved out of a partition's primary PHP, to a secondary PHP, should the primary PHP run out of space.  This also should work during upgrade/PHP conversion  -  yet of course creates a new dependency on sufficient free space in the corresponding dbspace's tblspace tblspace, or its ability to be extended.

    BR,
     Andreas

    ------------------------------
    Andreas Legner
    ------------------------------



  • 3.  RE: Minimum required free space in table/partition header during migration

    Posted 20 days ago
    Thank you Andreas, very good tip, plan is to migrate from 11.70 to 12.10.FC13

    ------------------------------
    Milan Rafaj
    ------------------------------



  • 4.  RE: Minimum required free space in table/partition header during migration

    Posted 20 days ago
    Hi Milan - very good plan! ;-)

    ------------------------------
    Andreas Legner
    ------------------------------