RE: Re: Loading optimization

From: "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, Alfred Perlstein <bright(at)wintelcom(dot)net>, Ian Harding <iharding(at)pakrat(dot)com>, Martijn van Oosterhout <kleptog(at)cupid(dot)suninternet(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: RE: Re: Loading optimization
Date: 2001-01-12 01:19:29
Message-ID: 8F4C99C66D04D4118F580090272A7A234D3269@sectorbase1.sectorbase.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> >> 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tod McQuillin 2001-01-12 01:36:16 Re: SQL command for value comparison
Previous Message Tom Lane 2001-01-12 01:00:15 Re: Re: Loading optimization

Browse pgsql-hackers by date

  From Date Subject
Next Message Mikheev, Vadim 2001-01-12 01:26:03 RE: AW: Re: GiST for 7.1 !!
Previous Message Tom Lane 2001-01-12 00:51:41 Re: AW: Re: GiST for 7.1 !!