Re: How does one count free logical logs in 7.23?
Posted in 1997
>A company I work for uses INFORMIX Vn. 7.23. As one of
>its future administrators, I have a problem with checking
>how full the logical logs are, since {onstat -l} now says
>all logs but the current one are "used" (and 100% "full"),
>once they have been used at all since the initialisation
>of the server. Under previous versions {tbstat -l} spoke of
>"free" and "used" logs, and we could prevent problems by
>occasionally checking how many logs were still free at any
>given time.
>
>I've searched the descriptions I have of the "sysmaster"
>database, tried a few SELECTs on "syslogs", but I don't get
>any information on which logs are truly free - there is a
>column called "is_backed_up", but it gets set for logs that
>are still in transaction, too, so it doesn't seem to be
>any help...
>
>INFORMIX Germany has said "it's a feature not a bug" at
>some earlier stage. Before we ask them again (which costs
>money since we're not on a hot-line contract), can anyone
>help?
>
>Thanks for your time...
>
Yep --- I know it sounds really silly, but it really is a feature.
Here's the scoop.
In the past, Informix distinguished between a backed-up log and a free
log. We would mark the log as "free" during transaction commits and/or
rollbacks if that log file had been backed up, it contained no other active
transactions, and no prior log files containd any active transactions.
Basically all we did was to re-initialize the log header information in the
reserved pages so that it was ready for re-use.
However, this presents a problem for replication. Suppose that for some
reason, replication is running behind. Well, we need a way to know
wheither the replication threads can transfer data from the log files to a
replicate. What happens is that if the log file is marked as in-use, then
replication (both HDR and CDR) can replicate from it. If instead it does
not, then the replication threads can not.
So -- what's a guy supposed to do to know just how close he is to a long
transaction?
(I may need some help with this because I don't have access to an instance
where I at right now.)
Basically, by taking the oldest begin log entry from the systransactions
table within sysmaster database, you can determine which log files are
similar to the "free" status of old. If the log file has a lower unique id
than the lowest entry from systransactions, then that log file is "free".
We've had several sample queries that could be run against sysmaster
database in the past concerning this problem. Maybe someone would be
willing to post one of the them again.
Madison Pruet