Nonstop Database, HiRDB Version 9 System Operation Guide

[Contents][Index][Back][Next]

15.11.3 Reusing used free segments

Organization of this subsection
(1) Releasing used free segments
(2) Benefits of releasing used free segments
(3) Method of operation

(1) Releasing used free segments

By executing the free page release utility, you can convert used free segments to unused segments and reuse them. This is called releasing used free segments. The following figure provides an overview of releasing used free segments.

Figure 15-5 Releasing used free segments

[Figure]

(2) Benefits of releasing used free segments

Once segments are allocated, only the table (or index) that is assigned to use a particular segment can use it; no other tables can do so. Releasing used free segments converts used free segments to unused segments, which enables other tables to use those segments.

(3) Method of operation

Whether to release used free segments is determined from the execution results of the free page release utility or the database condition analysis utility. Release used free segments if there are a large number of them.

(a) Estimate the system log file capacity

Because updated logs of the database are obtained when used free segments are released, we recommend that you re-estimate the system log file capacity. For details about estimating system log file capacity, see the HiRDB Version 9 Installation and Design Guide.

(b) Execute the free page release utility

You use the free page release utility to release used free segments.

The following table shows the advantages and disadvantages of the option values specified during execution of the free page release utility.

Option
specification value
Advantage Disadvantage
-j Because the RDAREA is exclusively used, processing can occur at high speed, and the execution time is shorter than when the -a option is specified. Because the RDAREA is exclusively used, other UAPs cannot access the RDAREA undergoing processing, and as a result they go into a wait state#.
-a Can be simultaneously executed with other UAPs. Because processing takes place in multiple phases internally, the execution time is longer and the volume of system logs output is larger than when the -j option is specified.

#
To cause an error return without placing a UAP in wait state, use the pdhold command to shut down the RDAREA, and then execute the utility.

We generally recommend that you use the -j option. If an online service or the like cannot be stopped while the free page release utility is being executed with the -j option specified, execute the free page release utility with the -a option specified when the data traffic is relatively light.

(c) Check the execution results

Check the execution results of the free page release utility to determine if used free segments have been released as expected.

While the free page release utility is being executed with the -a option specified, if the utility itself or HiRDB terminates abnormally, use the database condition analysis utility (pddbst) to analyze the applicable table or index. Make sure that there is no segment being released (segment that cannot be reused because it is in the process of being released).

(d) If the free page release utility terminates abnormally

With the -j option specified

If the free page release utility terminates abnormally, the system returns to the status it was in before the utility was executed (before any operation was performed). In such a case, simply re-execute the free page release utility. Although not re-executing the free page release utility does not create a problem, no used free segments are released if you do not re-execute. The same holds true when HiRDB terminates abnormally while the utility is executing.

With the -a option specified
If the free page release utility terminates abnormally, a segment being released might remain. If a segment being released remains, take one of the following actions:
  • Re-execute the free page release utility.
  • Use the database reorganization utility (pdrorg) to reorganize the table or index.
The same holds true when HiRDB terminates abnormally while the utility is executing.