]> granicus.if.org Git - postgresql/commit
Don’t push nextid too far forwards in recovery
authorSimon Riggs <simon@2ndQuadrant.com>
Tue, 18 Apr 2017 10:14:05 +0000 (11:14 +0100)
committerSimon Riggs <simon@2ndQuadrant.com>
Tue, 18 Apr 2017 10:14:05 +0000 (11:14 +0100)
commitaa203e76004daaee3d70b19cc727ed17b87b3d3a
tree2264c35f4a28dd7c63e8ec52cab14a2be983a44c
parent51175f3638524231405e674e40bde159b0b76727
Don’t push nextid too far forwards in recovery

Doing so allows various crash possibilities. Fix by avoiding
having PrescanPreparedTransactions() increment
ShmemVariableCache->nextXid when it has no 2PC files

Bug found by Jeff Janes, diagnosis and patch by Pavan Deolasee,
then patch re-designed for clarity and full accuracy by
Michael Paquier.

Reported-by: Jeff Janes
Author: Pavan Deolasee, Michael Paquier
Discussion: https://postgr.es/m/CAMkU=1zMLnH_i1-PVQ-biZzvNx7VcuatriquEnh7HNk6K8Ss3Q@mail.gmail.com
src/backend/access/transam/twophase.c