Informix

 View Only
  • 1.  "Physical Logging while in Critical Section" in online log

    Posted Wed June 22, 2022 08:18 PM
    I'm getting the message below in the online log, and I want to know in which case it occurs.
    Looking at the transaction log at that time with onlog, this message seems to occur at the time of truncate and chfree.
    It is currently suspected that truncate caused the message.
    Is this message informative? Or is there a problem?

    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 40 Remaining Phyical Log: 5982541
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 80 Remaining Phyical Log: 5982501
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 120 Remaining Phyical Log: 5982460
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 160 Remaining Phyical Log: 5982420
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 200 Remaining Phyical Log: 5982380
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 240 Remaining Phyical Log: 5982340
    06/22/22 05:28:05  Physical Logging while in Critical Section: Number of pages logged in critcal section: 280 Remaining Phyical Log: 5982299
    06/22/22 05:28:06  Physical Logging while in Critical Section: Number of pages logged in critcal section: 320 Remaining Phyical Log: 5982259
    06/22/22 05:28:06  Physical Logging while in Critical Section: Number of pages logged in critcal section: 360 Remaining Phyical Log: 5982219
    06/22/22 05:28:06  Physical Logging while in Critical Section: Number of pages logged in critcal section: 400 Remaining Phyical Log: 5982178
    06/22/22 05:28:08  Checkpoint Completed:  duration was 3 seconds.
    06/22/22 05:28:08  Wed Jun 22 - loguniq 308619, logpos 0x6dd5d0e4, timestamp: 0x42df37b9 Interval: 702656​


    ------------------------------
    SangGyu Jeong
    Software Engineer
    Infrasoft
    Seoul Korea, Republic of
    ------------------------------

    #Informix


  • 2.  RE: "Physical Logging while in Critical Section" in online log

    IBM Champion
    Posted Thu June 23, 2022 04:04 AM

    SangGyu:

    These messages are informational only in most cases. Checkpoints cannot begin until all sessions have left their critical code sections. A TRUNCATE on a very large table (especially a table with large object columns) can take a while and be in critical sections of code for relatively long periods so at some point a checkpoint may attempt to begin. That will trigger this warning because if the physical log fills while the TRUNCATE is still in a critical section and the server crashes it may not be possible to recover and rollback the TRUNCATE operation because physical logging will be suspended. That's all.

    Art



    ------------------------------
    Art S. Kagel, President and Principal Consultant
    ASK Database Management Corp.
    www.askdbmgt.com
    ------------------------------



  • 3.  RE: "Physical Logging while in Critical Section" in online log

    Posted Thu June 23, 2022 07:24 AM
    FYI I changed this message because it was stupid:

    Defect idsdb00109565 -- "Physical Logging while in Critical Section" message is frightening and pretty worthless

    Description:

    Once a DBA has sized the physical log at a reasonable level there isn't much they can do about what amounts to an internal issue. Yet this message is printed any time the number of pages physically logged inside a critical section hits 40 (20 on 4k platforms), even if gigabytes of physical log space remain available.

    It's a message that is mostly useful to development, as a warning that we may have a loop of work inside a critical section that we need to break into smaller batches. So I will leave it as-is for TESTMODE* servers, but in released product we should not print the message unless there's some level of urgency. We should also provide a thread ID at least. Currently there's too little info here:

    16:20:40  Physical Logging while in Critical Section: Number of pages logged in critcal section: 20 Remaining Phyical Log: 11665210

    My notes on the fix:

    The message now looks like this:

    Thread 1234 - Pages logged in critical section: 40. Remaining Phyical Log: 5213

    That message will print as often as ever in TESTMODE* but won't be printed in the field unless a calculation shows that we're in a bit of a pickle. There's still very little a user can do about the problem but at least Support will have a small paper trail if the physical log overflows.

    I'm sure it's still not perfect but hopefully I've improved it.

    This change went into 12.10.xC15 and 14.10.xC7.

    Thanks.

    -jc

    *A TESTMODE build is one that we use for internal testing. It does extra consistency checks and spits out extra messages to the log.

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