Scalable Database Server, HiRDB Version 8 Description

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

7.2.2 Creating an unload log file (unloading system log)

The pdlogunld command can be used to unload system log information and create an unload log file. Before you create an unload log file, you should check the status of the system log files.

Organization of this subsection
(1) Status of system log files
(2) Determining the status of the system log files
(3) Retaining unload log files
(4) Automatic log unloading facility for system log files

(1) Status of system log files

The file to which system log information is output is called the current file. If system log information fills the current file, the output for the system log information is changed to another system log file in a process called system log file swapping; what was the current file becomes an unload-wait file. The HiRDB administrator uses the pdlogunld command to unload unload-wait files. Figure 7-3 shows changes the system log file status changes.

Figure 7-3 System log file status changes

[Figure]

System log information cannot be output to an unload-wait file. If all system log files become unload-wait files, system log information cannot be output any longer, and HiRDB terminates abnormally. For this reason, it is essential that system log information be unloaded.

Notes on starting HiRDB normally
When HiRDB is started normally following a normal termination, system log files are swapped, creating an unload-wait file. This file should be unloaded without fail. If termination and startup are repeated without unloading system log information, HiRDB will eventually be unable to start.
Specifying pd_log_rerun_swap=Y in the server definition causes system log files to be swapped when HiRDB is restarted.

(2) Determining the status of the system log files

You can check the status of the system log files with the pdlogls command, as shown in the following example:

Example
Use the pdlogls command to check the status of the system log files.
[Figure]

Explanation
  • The file (log1) for which there is a "u" in column 3 is an unload-wait file. This file should be unloaded.
  • The file (log2) for which there is a "c" in column 2 is the current file.

(3) Retaining unload log files

Repeated unloading of system log information results in a proliferation of unload log files, which occupy disk space. The HiRDB administrator should delete unload log files as soon as they are no longer needed.

When a backup is made, unload log files containing only data produced prior to the backup are no longer needed. Figure 7-4 shows the relationship between a backup and unload log files.

Figure 7-4 Relationship between backup and unload log files

[Figure]

Explanation
  • The system log information that was output from 9:00 to 12:00 is unloaded to unload log file A.
  • The system log information that was output from 12:00 to 15:00 is unloaded to unload log file B.
  • The system log information that was output from 15:00 to 18:00 is unloaded to unload log file C.
  • If a backup is made around 13:00, the backup and unload log files B and C will be needed for any recovery of the database, but unload log file A will not be needed.
 
Note
Unload log files should be stored on a different disk from the disk containing the database. If they are all stored on the same disk, an error affecting the disk will prevent recovery of the database.

(4) Automatic log unloading facility for system log files

As explained above, the HiRDB administrator must use the pdlogunld command to unload any unload-wait system log files. If this operation is not performed, you may run out of system log files that can be swapped in when swapping occurs, causing HiRDB to terminate abnormally.

HiRDB provides a facility called the automatic log unloading facility that automates the unloading of system log files. When the unloading operation must be performed frequently, consider automating it.

For details about the automatic log unloading facility, see the HiRDB Version 8 System Operation Guide.