2.57 pdlogswap (Swap log files)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Rules
(6) Notes

(1) Function

The pdlogswap command swaps log files. If there is no file to be swapped in, the command results in an error.

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration

pdlogswap -d sys [-s server-name] [-w [-t validation-wait-monitoring-time]]

(b) HiRDB parallel server configuration

pdlogswap -d sys -s server-name [-w [-t validation-wait-monitoring-time]]

(4) Options

(a) -d sys

Specifies that system log files are to be swapped.

(b) -s server-name ~<identifier> ((1-8))

Specifies the name of the server corresponding to the file group whose files are to be swapped.

(c) -w

Specifies that termination of the command is to be delayed until the synchronization point dump that is obtained after the system log files are swapped has been validated.

If HiRDB is operated without unloading the system log, specifying this option to swap system log files prior to database backup provides the following advantages:

(d) -t validation-wait-monitoring-time ~ <unsigned integer> ((10-32768)) <<180>>

Specifies in seconds the amount of time for monitoring for validation of the synchronization point dump when the -w option is specified (the -w option delays termination of the command until the synchronization point dump has been validated). This option is applicable only when the -w option is specified.

(5) Rules

  1. The pdlogswap command can be executed only while HiRDB is active.
    This command cannot be executed in the following cases:
    • While HiRDB is starting
    • While HiRDB is terminating
    • When HiRDB was started by the pdstart -r command
  2. The pdlogswap command must be executed at the server machine containing the single server or the server machine where the system manager is located.
  3. Only one pdlogswap command can be executed at a time. However, while a pdlogswap command with the -w option specified is waiting for validation of a synchronization point dump, another pdlogswap command without the -w option specified can be executed.

(6) Notes

  1. The results of the pdlogswap command can be checked by the pdlogls command, the KFPS01280-E error message (reason code 105 or 116), or the return code after command execution. The return code can be obtained using echo $status. The values returned after command execution are as follows:
    0
    Terminated normally.
    4
    System log files were swapped, but command processing was terminated forcibly because the synchronization point dump was not validated within the validation wait monitoring time specified in the -t option.
    8
    Terminated abnormally.
  2. When the -w option is specified and the synchronization point dump is not validated within the validation wait monitoring time specified in the -t option, the pdlogswap command is terminated forcibly.
  3. If safe or warn is specified in the pd_log_remain_space_check operand and one of the following is applicable, the facility for monitoring free space for system log files may detect a space shortage in the system log file:
    • The pdlogswap command was executed when the size of the file group in the swappable target status and in the standby status was less than the size of the current file group.
    • More than one pdlogswap command was executed consecutively.
    For details about the facility for monitoring free space for system log files, see the HiRDB Version 9 System Operation Guide.