SlruPhysicalReadPage

Started by Simon Riggsabout 17 years ago3 messages
#1Simon Riggs
simon@2ndQuadrant.com

SlruPhysicalReadPage() succeeds InRecovery if the file does not exist.

BUT, if the file exists but is wrong size then it will still fail even
InRecovery.

This seems inconsistent. Why is the first page OK to be created, but any
other pages after that cause failure? ISTM the first page is nothing
special.

I think this can cause recovery to fail *now*. What say you?

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Simon Riggs (#1)
Re: SlruPhysicalReadPage

Simon Riggs <simon@2ndQuadrant.com> writes:

This seems inconsistent. Why is the first page OK to be created, but any
other pages after that cause failure? ISTM the first page is nothing
special.

It's special on the writing side, I'm not sure why the reading side
wouldn't treat it specially too.

regards, tom lane

#3Simon Riggs
simon@2ndQuadrant.com
In reply to: Tom Lane (#2)
Re: SlruPhysicalReadPage

On Wed, 2008-10-15 at 15:13 -0400, Tom Lane wrote:

Simon Riggs <simon@2ndQuadrant.com> writes:

This seems inconsistent. Why is the first page OK to be created, but any
other pages after that cause failure? ISTM the first page is nothing
special.

It's special on the writing side, I'm not sure why the reading side
wouldn't treat it specially too.

I've added code for seek and read also, not just open.

--
Simon Riggs www.2ndQuadrant.com
PostgreSQL Training, Services and Support