Informix

Expand all | Collapse all

Undocumented logical log flags

  • 1.  Undocumented logical log flags

    Posted Thu February 18, 2021 09:40 AM
    Hi,

    Could anyone advise on the logical log flags shown in this 'onstat -l' excerpt please?

    address number flags uniqid begin size used %used
    ...
    17d9074a0 1720 URB---- 2400038 261:45678595 65536 65536 100.00
    17d907508 1721 URB---- 2400039 261:45744131 65536 65536 100.00
    17d907570 1722 URB---- 2400040 261:45809667 65536 65536 100.00
    17d9075d8 1723 UX----- 2400041 261:45875203 65536 65536 100.00
    17d907640 1724 UX----- 2400042 261:45940739 65536 65536 100.00
    17d9076a8 1725 UX----- 2400043 261:46006275 65536 65536 100.00
    17d907710 1726 UX----L 2400044 261:46071811 65536 65536 100.00
    17d907778 1727 UX--C-- 2400045 261:46137347 65536 62704 95.68
    17d9077e0 1728 URB---- 2394090 261:46202883 65536 65536 100.00
    ...

    Specifically the 'R' and the 'X' flags which are not in the Informix manual.

    For context I have added extra logical logs and a real level 0 backup is currently taking place.

    Ben.

    ------------------------------
    Benjamin Thompson
    ------------------------------


  • 2.  RE: Undocumented logical log flags

    Posted Thu February 18, 2021 09:47 AM

    Is it similar to the X flag on onstat –d you see when you add a mirror to a critical space and is only removed after a backup ?

     

    Cheers

    Paul

     






  • 3.  RE: Undocumented logical log flags

    Posted Thu February 18, 2021 10:07 AM
    I should clarify that the logs above are the original ones. The DBSpace containing the logs is not mirrored. The new logs I added have flags 'A------' which is I have observed many times.

    Maybe yes, it will clear after a backup. When I have time to do some more testing I will report back here.

    ------------------------------
    Benjamin Thompson
    ------------------------------



  • 4.  RE: Undocumented logical log flags

    Posted Thu February 18, 2021 11:03 AM
    I got a private reply saying these statuses are protecting a log from being overwritten until the L0 archive has finished.

    ------------------------------
    Benjamin Thompson
    ------------------------------



  • 5.  RE: Undocumented logical log flags

    Posted Fri February 19, 2021 12:53 PM
    Hi Ben

    The only reference to the R and X flags in the onstat -l output that I could find is here...

    https://www.oninit.com/onstat/index.php?id=l

    ...courtesy of Oninit. Personally, I have never seen these flags but now I must trap one in action.



    ------------------------------
    Kirit Rana
    ------------------------------



  • 6.  RE: Undocumented logical log flags

    Posted Fri February 19, 2021 01:09 PM

    I only added that after I got the details from Ben J

     






  • 7.  RE: Undocumented logical log flags

    Posted Fri February 19, 2021 01:49 PM
    LOL. Ben's the man!

    ------------------------------
    Kirit Rana
    ------------------------------



  • 8.  RE: Undocumented logical log flags

    Posted Fri February 19, 2021 10:14 PM

    Hi Ben et al. The reason our documentation doesn't contain info about these two flags is my fault :) In December of '19 I fixed defect idsdb00104861 ("onstat -l does not show LF_ARCHIVED and does not show AR_PROTECT_LOG") by adding the 'X' and 'R' flags to the onstat -l output, but I neglected to notify our doc person of the need to augment this page:

    https://www.ibm.com/support/knowledgecenter/en/SSGU8G_14.1.0/com.ibm.admin.doc/ids_admin_0691.htm

    I've sent her an email today and will follow up in a couple of weeks to make sure the correction is made.

    It looks like you guys have already figured out the meaning of these flags but I'll give you a few more details in case it's of interest. Let's say you start a whole system backup when the current log is unique ID 44. Let's also say you have some open transactions, the oldest of which began work in log 41 and wrote some records there. This means that if you were to restore this archive and you elected not to roll forward any logs, the first thing the server would do before going into quiescent mode is roll back the transactions that were open at the time of the archive checkpoint, which means it would need to have logs 41 through 44 on disk.

    When we start the archive we know we need those logs, so after archiving the reserve pages from rootdbs the next thing we send to the archive stream is what we call a "log snapshot"--the needed pages from logs 41 through 44. We don't need any log older than 41 so we don't bother including it on the archive. And the archive doesn't need any logs beyond 44. In fact it doesn't need any log pages beyond the one in log 44 that contains the archive checkpoint. So this log snapshot will include only logs 41 through that specific page in log 44.

    Until those needed logs are written to the archive we can't allow them to be freed and potentially overwritten, so we use a flag on each log file structure to distinguish between log group 41-44 and all the other logs, which can be freed if necessary because the archive doesn't care about them.

    If a log file in the onstat -l output has the 'X' flag that means there's an archive that has just started and the log hasn't yet been written to that archive.

    If a log file has the 'R' flag it means there's an archive going but that log is not needed for this archive, either because it never was to begin with or it's already been written to the stream. As each log file is archived you'll see its flag change from 'X' to 'R'.

    This is all unrelated to logical log backups. The log snapshot I've been referring to is included in the archive itself. Neither the 'X' flag nor the 'R' flag says anything about whether a log has been backed up in the usual way.

    Thanks, and sorry for the oversight. It should be corrected soon.

    -jc



    ------------------------------
    John Lengyel
    ------------------------------



  • 9.  RE: Undocumented logical log flags

    Posted Mon February 22, 2021 09:58 AM
    Thanks John. This is a more detailed reply than I ever hoped to get.

    I was looking at this document: https://www.ibm.com/support/knowledgecenter/en/SSGU8G_14.1.0/com.ibm.adref.doc/ids_adr_0598.htm

    Good to know they are fairly new; I don't recall seeing them before.

    Ben.

    ------------------------------
    Benjamin Thompson
    ------------------------------



  • 10.  RE: Undocumented logical log flags

    Posted Mon February 22, 2021 10:23 AM
    Thanks Ben. I've asked our doc person to update that page as well.
    ::DISCLAIMER::

    The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. E-mail transmission is not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or may contain viruses in transmission. The e mail and its contents (with or without referred errors) shall therefore not attach any liability on the originator or HCL or its affiliates. Views or opinions, if any, presented in this email are solely those of the author and may not necessarily reflect the views or opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of authorized representative of HCL is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any email and/or attachments, please check them for viruses and other defects.






  • 11.  RE: Undocumented logical log flags

    Posted Mon February 22, 2021 11:52 AM
    Hello John,
    yesteraday I'v just installed 14.1.FC5 on ubuntu 20.04 and saw flag W  in onstat -l. Can you comment this one as well?
    Thanks

    ------------------------------
    Milan Rafaj
    ------------------------------



  • 12.  RE: Undocumented logical log flags

    Posted Mon February 22, 2021 01:45 PM
    Hi Milan. That flag means we are currently in the process of flushing a log buffer to that log file on disk. An individual flush should be extremely brief but if you've got a lot of logging activity we're constantly writing out log buffers, so you may see that flag under load. It's not an indication of a problem; it just means we're flushing at that moment. 

    FYI here are the five flags and their descriptions that we'll be adding to the doc page Ben mentioned above:

    G    Staged for Enterprise Replication
    R    Not needed by the currently active archive
    W   Records are currently being flushed to this log
    X    Still needed by an active archive
    Z    Will be cleared before use

    These flags are all present in xC5.

    -jc

    ------------------------------
    John Lengyel
    ------------------------------