On Fri, Mar 09, 2012 at 03:04:23PM -0500, Tom Lane wrote:
> The main actual simplification would be in getting rid of the "hole"
> at the end of each 4GB worth of WAL, cf this bit in xlog_internal.h:
>
> /*
> * We break each logical log file (xlogid value) into segment files of the
> * size indicated by XLOG_SEG_SIZE. One possible segment at the end of each
> * log file is wasted, to ensure that we don't have problems representing
> * last-byte-position-plus-1.
> */
> #define XLogSegSize ((uint32) XLOG_SEG_SIZE)
> #define XLogSegsPerFile (((uint32) 0xffffffff) / XLogSegSize)
> #define XLogFileSize (XLogSegsPerFile * XLogSegSize)
>
> If we can't get rid of that and have a continuous 64-bit WAL address
> space then it's unlikely we can actually simplify any logic.
>
> Now, doing that doesn't break the naming convention exactly; what it
> changes is that there will be WAL files numbered xxxFFFF (for some
> number of trailing-1-bits I'm too lazy to work out at the moment) where
> before there were not. So the question really is how much external code
> there is that is aware of that specific noncontiguous numbering behavior
> and would be broken if things stopped being that way.
Our current WAL naming is hopelessly arcane, and we would certainly be
benfitting users to simplify it. Is this a TODO?
-- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB
http://enterprisedb.com
+ It's impossible for everything to be true. +