IBM 000-8697 Manual Do Utilizador

Página de 702
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
writing
COMMIT
records are allowed access to the logical log. The intent 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
percent of 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,
OnLine cannot 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
OnLine processing 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 by
LTXHWM
, the
tbinit
 daemon begins searching for an open transaction in the oldest, used
(but not freed) logical log file. If a long transaction is found, tbinit directs the
executing database server process to begin to roll back the transaction. 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.
The goal is to free the oldest used logical log file 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 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.)