Re: ReadBuffer(P_NEW) versus valid buffers - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: ReadBuffer(P_NEW) versus valid buffers
Date
Msg-id 4515CE5E.1060309@paradise.net.nz
Whole thread Raw
In response to ReadBuffer(P_NEW) versus valid buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: ReadBuffer(P_NEW) versus valid buffers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> So ReadBuffer without hesitation zeroes out the page of data we just
> filled, and returns it for re-filling.  There went some tuples :-(
> 
> Although this is clearly Not Our Bug, it's annoying that ReadBuffer
> falls into the trap so easily instead of complaining.  I'm still
> disinclined to try to change the behavior of mdread(), but what I am
> considering doing is adding a check here to error out if not PageIsNew.
> AFAICS, if we do find a buffer for a page supposedly past EOF, it should
> be zero-filled because that's what mdread returns in this case.  So this
> change would prevent Dan's silent-overwrite scenario without changing the
> behavior for any legitimate case.
> 
> Thoughts, problems, better ideas?
> 

The check looks good - are we chasing up the Linux kernel (or Suse) guys 
to get the bug investigated?

Cheers

Mark


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Increase default effective_cache_size?
Next
From: Gevik Babakhani
Date:
Subject: Re: Increase default effective_cache_size?