2-160 IBM Informix OnLine Database Server Administrator’s Guide
Long Transactions
Thesecond long-transaction high-water mark, LTXEHWM, indicates that the
logicallog 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 records are allowed access to the logical log. The intent is to
preserveas much space as possible for rollback records being written by the
user processes that are rolling back transactions.
IfLTXHWM is defined as 50, a long transaction condition exists when 50
percentof the logical log space is considered “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,
OnLinecannot free a logical log file until all the transactions 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 finds that it is “used,” all
OnLineprocessing is suspended. OnLine cannot skip over a used logical log
file to find another that is free.
When the logical log fills to the high-water mark specified byLTXHWM, the
tbinit daemon begins searching for an open transaction in the oldest, used
(butnot freed) logical log file. If a long transaction is found, tbinit directs the
executingdatabase server process to begin to roll back the transaction. More
than one transaction may be rolled back if more than one long transaction
exists.
Thetransaction rollback itself generates logical log records, however, and as
other processes continue writing to the logical log, the log continues to fill.
Thegoal is to free the oldest used logical log ��le before the log fills to a critical
point.
As the logical log continues to fill, it might reach a second high-water mark
specified as theexclusive-access, long-transaction high-water mark . This second
boundary is specified by theLTXEHWM configuration file parameter. The
default value ofLTXEHWM is 60 percent.
If the logical log files fill to the point defined byLTXEHWM, 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 aCOMMIT
record or is currently rolling back a transaction, it is allowed to continue.)