diff options
author | Simon Riggs <simon@2ndQuadrant.com> | 2013-06-23 11:05:02 +0100 |
---|---|---|
committer | Simon Riggs <simon@2ndQuadrant.com> | 2013-06-23 11:05:02 +0100 |
commit | 1f09121b4edee8b4d4cdd4ee0a8cffacee7b85f7 (patch) | |
tree | 02cb5b79be227c225654622eb3017581a61de825 /src/backend/access/transam/xlog.c | |
parent | dab1603e5238d3abce9f7a3a7b9450888cc07c70 (diff) | |
download | postgresql-1f09121b4edee8b4d4cdd4ee0a8cffacee7b85f7.tar.gz postgresql-1f09121b4edee8b4d4cdd4ee0a8cffacee7b85f7.zip |
Ensure no xid gaps during Hot Standby startup
In some cases with higher numbers of subtransactions
it was possible for us to incorrectly initialize
subtrans leading to complaints of missing pages.
Bug report by Sergey Konoplev
Analysis and fix by Andres Freund
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 9f858995d12..66447033695 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -5391,6 +5391,9 @@ StartupXLOG(void) oldestActiveXID = checkPoint.oldestActiveXid; Assert(TransactionIdIsValid(oldestActiveXID)); + /* Tell procarray about the range of xids it has to deal with */ + ProcArrayInitRecovery(ShmemVariableCache->nextXid); + /* * Startup commit log and subtrans only. Other SLRUs are not * maintained during recovery and need not be started yet. |