HS starting snapshot corrections - Mailing list pgsql-hackers

From Simon Riggs
Subject HS starting snapshot corrections
Date
Msg-id 1273658492.308.349.camel@ebony
Whole thread Raw
List pgsql-hackers
Tom pointed out two errors that could effect the HS startup code, which
is fairly subtle.

Attached patch is small with these changes
* adds new section comment as posted to hackers earlier
* adds comments to other functions
* makes minor corrections to a few existing comments
* fixes the two bugs observed by Tom so that snapshotOldestActiveXid no
longer exists, xids are tracked as soon as (standbyState >=
STANDBY_INITIALIZED) and ProcArrayApplyRecoveryInfo() is substantially
re-written with comments at every stage
* fixes an old bug that set xmax incorrectly in initial snapshot, though
would normally have been corrected soon afterwards as recovery continues
* fixes a simple bug introduced in recent sorted knownassignedxids patch
that would give incorrect snapshots
* minor refactoring of xact_redo_abort() and
ExpireTreeKnownAssignedTransactionIds()
* new debug message for when in STANDBY_SNAPSHOT_PENDING and we fail to
move to STANDBY_SNAPSHOT_READY

I have avoided adding a new WAL record as I mentioned was required
earlier, deciding that it wasn't any easier to understand that way.

I will apply tomorrow in the absence of review objections.

--
 Simon Riggs           www.2ndQuadrant.com

Attachment

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: max_standby_delay considered harmful
Next
From: Koichi Suzuki
Date:
Subject: Bug-fix and new feature of pg_lesslog is released