Log Writer Process (LGWR)

Committing Redo Changes 🚀

🧾 What Is LGWR?

The Log Writer Process (LGWR) is a crucial background process in Oracle Database that ensures all changes made in memory (redo log buffer) are safely written to online redo log files—protecting data integrity and enabling recovery.

🛠️ What Does LGWR Do?

🔧 Function📌 Details
🪵 Sequential Redo LoggingWrites redo log entries from the redo log buffer to the online redo logs.
🪟 Multiplexed LoggingIn a multiplexed redo log setup, LGWR writes to all members of the group simultaneously.
⚙️ Delegates WorkUses LGnn worker processes (LG00–LG99) for parallel writing operations and posting results to waiting server processes.
📡 Redo ShippingTTnn processes (TT00–TTzz) send redo logs to standby databases when ASYNC redo transport is configured.

🧩 Additional Notes

  • LGWR runs as either a thread or OS process, depending on the environment.
  • Operates in Oracle ASM and Oracle RAC—each RAC instance has its own redo log set.
  • Ensures recoverability by immediately flushing redo entries during commits, checkpoints, and log switches.

🔒 Why LGWR Matters

  • Guarantees durability of transactions.
  • Enables fast recovery in the event of a failure.
  • Minimizes performance impact by offloading to worker processes.

📘 Tip of the Day:
Use the view V$LOGFILE and V$LOG to monitor LGWR activity and multiplexed redo log status. Keeping redo logs on separate disks enhances performance and safety!

ADVERTISEMENT