From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | HS starting snapshot corrections |
Date: | 2010-05-12 10:01:32 |
Message-ID: | 1273658492.308.349.camel@ebony |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
hs_init_cleanup.v3.patch | text/x-patch | 30.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Koichi Suzuki | 2010-05-12 10:21:10 | Bug-fix and new feature of pg_lesslog is released |
Previous Message | Simon Riggs | 2010-05-12 06:50:57 | Re: max_standby_delay considered harmful |