From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Justin Clift <justin(at)postgresql(dot)org>, pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: WAL Log numbering |
Date: | 2001-09-22 03:58:57 |
Message-ID: | 200109220358.f8M3wv624974@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
Attached is a patch that changes "sequential" to "ever-increasing".
> Justin Clift <justin(at)postgresql(dot)org> writes:
> > I would have though that after 00000000000000FE would be
> > 0000000000000100, not 0000000100000000.
>
> This is the intended behavior, I believe. The low-order half is a
> 32-bit byte offset DIV XLogSegSize --- we could compress out the zero
> bits, but only at the cost of wiring an assumption about XLogSegSize
> into the filename format. The reason that 0/FF is missing from the
> sequence is stated in xlog.h:
>
> /*
> * We break each logical log file (xlogid value) into 16Mb segments.
> * 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) (16*1024*1024))
> #define XLogSegsPerFile (((uint32) 0xffffffff) / XLogSegSize)
> #define XLogFileSize (XLogSegsPerFile * XLogSegSize)
>
> > Just checked through the Interactive docs (not sure which version of 7.1
> > they are) and says the numbers should be sequential.
>
> This would seem to be an oversimplification in the docs.
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/plain | 1.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-09-22 04:25:58 | Re: Website, mailing list |
Previous Message | Vince Vielhaber | 2001-09-22 02:54:05 | Re: Website, mailing list |