Thread: SlruPhysicalReadPage

SlruPhysicalReadPage

From
Simon Riggs
Date:
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.comPostgreSQL Training, Services and Support



Re: SlruPhysicalReadPage

From
Tom Lane
Date:
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


Re: SlruPhysicalReadPage

From
Simon Riggs
Date:
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.comPostgreSQL Training, Services and Support