How to Avoid Logfull Abort
To avoid logfull aborts, examine the transaction processing strategy errors that caused the log file to fill. Consider the following points:
• If transactions do many updates or are left open for a long time, you must either commit them more frequently or increase the size of the log file. If the log file size is increased, check the “percentage of logfile written” before a consistency point is taken. For details, see the ipm, logstat, or VDBA output.
• Avoid continuous transaction errors by:
– Setting autocommit on where applicable
– Avoiding application errors that are caused by beginning transactions before they get all the user input required or by failing to use Ingres application timeout features. (Timeout features are discussed in the SQL Reference Guide and Forms-based Application Development Tools User Guide. Also, for a discussion of transaction processing, see the SQL Reference Guide.)
• If you have taken the above precautions but still get log full/abort, the transaction log is sized too small for the types of transactions you need to process. Read the tips in the next section on choosing the correct transaction log file size.
• Use set log_trace to examine the size and type of log records being written to the log file.
Process of Resizing Transaction Logs
Resizing transaction logs involves these steps:
1. Determine whether the log requires resizing
2. Resize the transaction log file
3. Reestablish Dual Logging
Determine Whether a Log Requires Resizing
To determine whether a log requires resizing, use one of the following procedures.
Using VDBA’s Performance Monitor, start a monitoring session on the desired node:
1. Select the node in the left pane and click the Monitor toolbar button.
2. Select Log Information in the branch.
3. Click the Header tab in the right pane to display log usage.
Start the Interactive Performance Monitor utility (ipm).
1. Highlight the Log_info menu item and select the Select option.
2. Highlight the Header menu item and select the Select option.
3. The Log file Diagram shows the percentage use of the Transaction Log.
4. Exit the ipm program.
Find the current peak transaction load by using the logstat utility to monitor the amount of log file that is in use during your peak hours. This allows you to choose the correct size for your log file. Because requirements change, you must monitor the log file regularly.
1. Enter the logstat command.
2. Find the value under % of log file in use.
3. If the log file needs to be resized, select the new size.
UNIX: Use mkrawlog to reconfigure a raw log file.
4. Shut down the installation by entering the ingstop command.
Resize the Transaction Log File
To resize the transaction file, follow these steps:
1. Shut down the Ingres installation by entering the ingstop command.
2. Start the Configuration-By-Forms (cbf) or Configuration Manager (vcbf) utility.
a. Choose Transaction Log from the menu.
The file name is displayed along with the current size of the Transaction Log.
b. Choose Destroy.
When destroyed, the Transaction Log information table is emptied.
c. Select the Create option.
d. Enter the required Transaction Log file size in megabytes.
The transaction log is created.
3. Exit cbf or vcbf.
4. Restart the installation by entering the command ingstart.
Important! Reconfiguring your log file destroys the current contents of the file and leaves an empty, reinitialized log file after the reconfiguration is complete. When Ingres is shut down, all transactions are written to disk; therefore, to prevent inconsistent database problems, reconfigure the log file only after a successful installation shutdown procedure.
Reestablish Dual Logging
A failure in one of the two dual log files is most often symptomatic of hardware problems. In the event of such a failure, you must reestablish dual logging at the first opportunity.
To re-establish dual logging after a failure of one of the log files, follow these steps:
1. Shut down the installation.
2. Create a new log file in the location of the failed log.
3. Start the Configuration-By-Forms (cbf) or Configuration Manager (vcbf) utility.
4. Select dual transaction log.
5. Select Reformat.
This automatically determines which of the log files is valid and copies the contents of the valid log to the newly created log file. After the copy is complete, both log files are marked valid. Dual logging is reestablished.
6. Restart the installation with the ingstart command.
7. Check that both log files are enabled by using Configuration-By-Forms (cbf) or Configuration Manager (vcbf).