Skip to content

RDS PostgreSQL log reads lose the rest of each log file when RDS rotates the log #4708

Closed

Description

@erikdarlingdata

Each RDS log read opens only the newest log file. When RDS rotates the log (hourly by default, and the
hourly plan capture read also lands on a new file), whatever the previous file received after the last
read is never read. That affects deadlocks, log events and plan capture, in both the stderr and csvlog
formats. A new stderr file is also read from its last 10,000 lines instead of its start, so a busy
instance loses more. Separately, the read positions live only in memory, so a service restart re-reads
only the last 10,000 lines of each file and loses what the outage window held beyond that.

Expected: a rotation loses nothing. The old file is read from the stored position to its end before
the newest file is read, a new stderr file is read from its start, and positions survive a restart.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions