Re: Re: Loading optimization

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Re: Loading optimization
Дата
Msg-id 13550.979261215@sss.pgh.pa.us
обсуждение исходный текст
Ответ на RE: Re: Loading optimization  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
Список pgsql-general
"Mikheev, Vadim" <vmikheev@SECTORBASE.COM> writes:
>> 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.

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.

Perhaps WAL redo needs to be prepared to do PageInit as well?

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.


>> If we are careful that
>> we init a btree page before we modify its sibling(s) and parent, we
>> should be OK.

> Should be covered by WALoging of newroot & split ops which only add
> new pages.

OK, sounds good.

            regards, tom lane

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: postmaster won't run
Следующее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: Re: Loading optimization