Re: Summary and Plan for Hot Standby - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Summary and Plan for Hot Standby
Date
Msg-id 1260619647.10425.62.camel@ebony
Whole thread Raw
In response to Re: Summary and Plan for Hot Standby  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Sun, 2009-11-15 at 16:07 +0200, Heikki Linnakangas wrote:
> - When replaying b-tree deletions, we currently wait out/cancel all
> running (read-only) transactions. We take the ultra-conservative
> stance because we don't know how recent the tuples being deleted are.
> If we could store a better estimate for latestRemovedXid in the WAL
> record, we could make that less conservative.

I think I can improve on the way we do this somewhat.

When we GetConflictingVirtualXIDs() with InvalidTransactionId we include
all backends.

If a query can only see currently-running xacts then it cannot see any
data that is being cleaned up because its xmin > latestCompletedXid.

Put another way, Assert(latestRemovedXid <= latestCompletedXid)

-- Simon Riggs           www.2ndQuadrant.com



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: LDAP where DN does not include UID attribute
Next
From: "Ing . Marcos Lui's Orti'z Valmaseda"
Date:
Subject: Re: SE-PostgreSQL/Lite Review