Re: Weird WAL problem - 9.0.3 - Mailing list pgsql-general

From Tom Lane
Subject Re: Weird WAL problem - 9.0.3
Date
Msg-id 7064.1302713903@sss.pgh.pa.us
Whole thread Raw
In response to Re: Weird WAL problem - 9.0.3  (Rafael Martinez <r.m.guerrero@usit.uio.no>)
List pgsql-general
Rafael Martinez <r.m.guerrero@usit.uio.no> writes:
> But this doesn't explain the WAL files not been created/recycled
> time-ordered. I wonder if this happened because the partition got full
> while the WALs were created/recycled?

When a checkpoint finishes, it scans the pg_xlog directory to find WAL
files that are no longer needed (because they're before the checkpoint's
WAL replay point).  It will either rename them "forward" to become ready
for future use, or delete them if there are already enough future WAL
files present (as determined by checkpoint_segments).  The order in
which old segments get renamed to be future ones is basically chance,
because it's determined by the order in which readdir() visits them.
So there's no reason to think that their file timestamps will be in
order.

I would expect WAL files that are *behind* the current write point to
have increasing write timestamps.  But not those ahead.

            regards, tom lane

pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: updating rows which have a common value forconsecutive dates
Next
From: raghu ram
Date:
Subject: Streaming Replication limitations