aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/arrayfuncs.c
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2024-12-30 09:58:02 +0900
committerMichael Paquier <michael@paquier.xyz>2024-12-30 09:58:02 +0900
commit7e125b20eed65e61b07e2e9ef6901467e4f14272 (patch)
tree2cf2ecb9c5f7d497db5fc9345ec1af1bb1d5bb0f /src/backend/utils/adt/arrayfuncs.c
parente3584258154fac40e16f757fadd3361688a166d2 (diff)
downloadpostgresql-7e125b20eed65e61b07e2e9ef6901467e4f14272.tar.gz
postgresql-7e125b20eed65e61b07e2e9ef6901467e4f14272.zip
Fix failures with incorrect epoch handling for 2PC files at recovery
At the beginning of recovery, an orphaned two-phase file in an epoch different than the one defined in the checkpoint record could not be removed based on the assumptions that AdjustToFullTransactionId() relies on, assuming that all files would be either from the current epoch or from the previous epoch. If the checkpoint epoch was 0 while the 2PC file was orphaned and in the future, AdjustToFullTransactionId() would underflow the epoch used to build the 2PC file path. In non-assert builds, this would create a WARNING message referring to a 2PC file with an epoch of "FFFFFFFF" (or UINT32_MAX), as an effect of the underflow calculation, leaving the orphaned file around. Some tests are added with dummy 2PC files in the past and the future, checking that these are properly removed. Issue introduced by 5a1dfde8334b, that has switched two-phase state files to use FullTransactionIds. Reported-by: Vitaly Davydov Author: Michael Paquier Reviewed-by: Vitaly Davydov Discussion: https://postgr.es/m/13b5b6-676c3080-4d-531db900@47931709 Backpatch-through: 17
Diffstat (limited to 'src/backend/utils/adt/arrayfuncs.c')
0 files changed, 0 insertions, 0 deletions