Re: WAL Log numbering
От | Tom Lane |
---|---|
Тема | Re: WAL Log numbering |
Дата | |
Msg-id | 22812.1000795259@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | WAL Log numbering (Justin Clift <justin@postgresql.org>) |
Ответы |
Re: WAL Log numbering
|
Список | pgsql-bugs |
Justin Clift <justin@postgresql.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
В списке pgsql-bugs по дате отправления: