Re: Latest version of Hot Standby patch - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Latest version of Hot Standby patch
Date
Msg-id 1231415540.18005.149.camel@ebony.2ndQuadrant
Whole thread Raw
In response to Re: Latest version of Hot Standby patch  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Wed, 2009-01-07 at 13:18 +0200, Heikki Linnakangas wrote:
> There's still something wrong with the way subtransactions are handled. 
> I got:
> 
> postgres=# SELECT * FROM foo;
> ERROR:  could not access status of transaction 118649
> DETAIL:  Could not open file "pg_subtrans/0001": No such file or directory.
> 
> in the standby after some testing.

Currently, we don't run TruncateSubtrans() when we perform
restartpoints. That means that it's impossible for HS to see an xid as
running for which it's segment has been deleted. The only other
possibility is that the segment has not yet been created.

subtrans is not WAL logged, so new subtrans pages are never created
during recovery, so not yet created is a typical case.

This looks to be essentially the same error I had already fixed, just
that my fix in slru.c is not sufficient. The reason for this is that
initially this error occurred on the startup process when attempting to
record a subtransaction start. Now that has been optimised away, the
same error occurs, but now while reading rather than writing.

We don't wish to introduce WAL logging of subtrans, so the correct fix
is to simply widen the error-checking in SlruPhysicalReadPage() from
using InRecovery to IsRecoveryProcessingMode(). That then causes us to
return zeroes for the page requested rather than error out.

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



pgsql-hackers by date:

Previous
From: "Rushabh Lathia"
Date:
Subject: Segmentation fault on PG 8.4 CVS head
Next
From: Simon Riggs
Date:
Subject: Re: Latest version of Hot Standby patch