Re: Is the a "magic number" for WAL files

From: Thom Brown <thom(at)linux(dot)com>
To: Rob Sargent <robjsargent(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Is the a "magic number" for WAL files
Date: 2011-12-09 19:37:44
Message-ID: CAA-aLv6sVF2hk25BcOvbq=pxXYeYT3+PWsQS+hvXDsyPL+OZyA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 9 December 2011 18:46, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
> Along the same lines, what info is embedded in the file name? I see that
> the second non-zero recently went from 2 to 3.  Significance?
>
>
> 0000000100000030000000CF
>              ^
> --------------|

The WAL file name consists of timeline, segment set/segment block and
segment, Once the segment (the last 8 characters of the file name)
reaches 000000FE, the next file will have a segment 00000000 but
characters 9-16 will increment their value to reflect this wraparound.
So it's not any more significant that 1 added to 99 results in it
becoming 00 with a 1 before it.

--
Thom

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Geoghegan 2011-12-09 19:49:12 Re: Is the a "magic number" for WAL files
Previous Message Andrew Sullivan 2011-12-09 18:48:55 Re: OT DBA type question - GRANT PRIVILEGE