Re: Re: Loading optimization - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Loading optimization
Date
Msg-id 13550.979261215@sss.pgh.pa.us
Whole thread Raw
In response to RE: Re: Loading optimization  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: postmaster won't run
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: Re: Loading optimization