RE: Re: Loading optimization
От | Mikheev, Vadim |
---|---|
Тема | RE: Re: Loading optimization |
Дата | |
Msg-id | 8F4C99C66D04D4118F580090272A7A234D3269@sectorbase1.sectorbase.com обсуждение исходный текст |
Ответ на | Loading optimization (Gary Wesley <gary@db.stanford.edu>) |
Список | pgsql-general |
> >> This is OK for table files, unless someone's broken the > >> code that will auto-initialize a zero page when it comes across one. > > > Hmmm, I don't see anything like auto-initialization in code -:( > > Where did you put these changes? > > I didn't put 'em in, it looked like your work to me: see vacuum.c, > lines 618-622 in current sources. Oh, this code was there from 6.0 days. > Awhile back I did fix PageGetFreeSpace and some related macros to > deliver sane results when looking at an all-zero page header, so that > scans and inserts would ignore the page until vacuum fixes it. I see now - PageGetMaxOffsetNumber... Ok. > Perhaps WAL redo needs to be prepared to do PageInit as well? It calls PageIsNew and uses flag in record to know when a page could be uninitialized. > Actually, I'd expect the CRC check to catch an all-zeroes page (if > it fails to complain, then you misimplemented the CRC), so that would > be the place to deal with it now. I've used standard CRC32 implementation you pointed me to -:) But CRC is used in WAL records only. Vadim
В списке pgsql-general по дате отправления: