]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Reset lastOverflowedXid on standby when needed
authorAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Nov 2021 15:31:21 +0000 (18:31 +0300)
committerAlexander Korotkov <akorotkov@postgresql.org>
Sat, 6 Nov 2021 15:34:31 +0000 (18:34 +0300)
commit7381b79ade479de5038ad924fbff1c584a0d6fee
tree3e207f8360d52068bb352a13d6363027a9ce01ba
parente0eaeafd66462b1a584831f35f10ec1e017c3845
Reset lastOverflowedXid on standby when needed

Currently, lastOverflowedXid is never reset.  It's just adjusted on new
transactions known to be overflowed.  But if there are no overflowed
transactions for a long time, snapshots could be mistakenly marked as
suboverflowed due to wraparound.

This commit fixes this issue by resetting lastOverflowedXid when needed
altogether with KnownAssignedXids.

Backpatch to all supported versions.

Reported-by: Stan Hu
Discussion: https://postgr.es/m/CAMBWrQ%3DFp5UAsU_nATY7EMY7NHczG4-DTDU%3DmCvBQZAQ6wa2xQ%40mail.gmail.com
Author: Kyotaro Horiguchi, Alexander Korotkov
Reviewed-by: Stan Hu, Simon Riggs, Nikolay Samokhvalov, Andrey Borodin, Dmitry Dolgov
src/backend/storage/ipc/procarray.c