Re: Hot Standby: too many KnownAssignedXids - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Hot Standby: too many KnownAssignedXids
Date
Msg-id 1290611987.5412.22474.camel@ebony
Whole thread Raw
In response to Re: Hot Standby: too many KnownAssignedXids  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
List pgsql-hackers
On Wed, 2010-11-24 at 12:48 +0200, Heikki Linnakangas wrote:
> When recovery starts, we fetch the oldestActiveXid from the checkpoint
> record. Let's say that it's 100. We then start replaying WAL records 
> from the Redo pointer, and the first record (heap insert in your case)
> contains an Xid that's much larger than 100, say 10000. We call 
> RecordKnownAssignedXids() to make note that all xids between that
> range are in-progress, but there isn't enough room in the array for
> that.

Agreed.

> Hmm. I'm not sure off the top of my head how to fix that. Perhaps
stash 
> the xids we see during WAL replay in private memory instead of
> putting 
> them in the KnownAssignedXids array until we see the running-xacts
> record.

Moving LogStandbySnapshot() earlier will help but won't solve it fully.

Will think.

-- Simon Riggs           http://www.2ndQuadrant.com/books/PostgreSQL Development, 24x7 Support, Training and Services



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Suggested "easy" TODO: pg_dump --from-list
Next
From: Tom Lane
Date:
Subject: Re: profiling connection overhead