
2-160 IBM Informix OnLine Database Server Administrator’s Guide
Long Transactions
The second long-transaction high-water mark, LTXEHWM, indicates that the
logical log has filled to a critical level. Most user processes are denied access
to the logical log. Only user processes currently rolling back transactions
(including the long transaction) and database server processes currently
writingCOMMIT recordsareallowed access to thelogicallog.Theintent is to
preserve as much space as possible for rollback records being written by the
user processes that are rolling back transactions.
If LTXHWM is defined as 50, a long transaction condition exists when 50
percentof the logicallog space isconsidered“used.” The problem presented
by the long transaction is this: to increase the amount of free space in the
logical log, you must free one or more of the logical log files. However,
OnLine cannotfree a logical log file untilall thetransactions associated with
the records in the file are closed. If a single transaction stays open for an
extended period of time, OnLine cannot free the log file where that trans-
action began. Because OnLine writes to the logical log files in a sequential
order,if OnLine tries to write in the next log file and findsthatitis“used,”all
OnLine processing issuspended. OnLinecannot skip over a used logical log
file to find another that is free.
When the logical log fills to the high-water mark specified by LTXHWM, the
tbinit daemon begins searching for an open transaction in the oldest, used
(but not freed)logical log file.Ifa long transactionis found, tbinitdirects the
executing databaseserver process tobegin to roll back thetransaction. More
than one transaction may be rolled back if more than one long transaction
exists.
The transaction rollback itself generates logical log records, however, and as
other processes continue writing to the logical log, the log continues to fill.
Thegoalistofreetheoldestusedlogicallogfilebeforethelogfillstoacritical
point.
As the logical log continues to fill, it might reach a second high-water mark
specified as the exclusive-access, long-transaction high-water mark. This second
boundary is specified by the LTXEHWM configuration file parameter. The
default value of LTXEHWM is 60 percent.
If the logical log files fill to the point defined by LTXEHWM, most OnLine
server processes are denied access to the current logical log file. Only
database server processes that are rolling back transactions are allowed to
write to the file. (If a database server process is currently writing a COMMIT
record or is currently rolling back a transaction, it is allowed to continue.)
Kommentare zu diesen Handbüchern