The database engine reserves space within a storage area for recovery purposes. A database may grow during recovery, space in each data area is reserved to accommodate this growth. Users are allowed to expand a database up to the maximum area size minus the reserved value. For databases areas with a block size of 1024 KB or 2048 KB and 128 or 256 RPB (records per block), 1 GB of space is reserved for recovery. Other database block sizes and records per block combinations have a 5 GB reserve. As of OpenEdge 10.2B, all Type II storage areas have 5 GB reserved space.
For a user, the number of usable blocks in a data area is the maximum addressable number minus the reserve blocks.
The maximum addressable block number depends on the dbkey size and the number of records per block.
- This is (2^(31-recbits))-1 for 32-bit dbkeys and (2^(63-recbits))-1 for 64-bit dbkeys.
- The number of blocks reserved for recovery is the reserve size in bytes (1 GB or 5 GB) divided by the block size.
- For 32-bit dbkey areas with one record per block (recbits=0), the maximum addressable block number is (2^(31-0))-1, or 0x7FFFFFFF.
- The reserve would be 5 GB (0x140000000)
- For an 8192 KB database block size area, the maximum block number that the user may address would result in 0x7FF5FFFF (2,146,828,287) user addressable blocks:
(0x7FFFFFFF - (0x140000000/0x2000)).
Warning message 13435 is written to the database log file when the variable extent in an area grows to 80% and 90% of the maximum user addressable block number. These warnings cannot be relied on if the area is comprised of fixed length extents that include this range. Refer to Article Warning message (13435) doesn't report on fixed extent of Type I Area when it is hitting rowid limit
Database areas can exceed the user addressable space as a part of crash recovery. When going through crash recovery, the database will silently start writing to reserved space within an area as needed dependent upon is as apart of crash recovery we are forced to exceed the current user addressable space. This is important for DBA (Database Administrators) to be aware of. The reserve space within an area is a mechanism that ensures that when user addressable space within an area is reached, that we are able to go through crash recovery for further action to be taken on that area such as migrating tables contained within that area to other Type I or Type II storage areas or to archive data etc. Once that reserved space has been breached, DBAs need to be aware that there is no guarantee that in future attempts to go through crash recovery, that they will be able to. Whether or not they can get through future crash recovery efforts for this area will depend upon space left within the area as well as the amount of transactions for blocks in that area that may need to be undone and redone as a part of crash recovery.
Tools that can be used to monitor area growth are:
Database Statistics Tool
This information can also be gathered by looking at the output for the PROSTRCT STATISTICS command which can be run online or offline.
Example command: prostrct statistics dbname