Log Writer Process (LGWR)

Article Summary

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 […]

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!

Was this helpful?