summaryrefslogtreecommitdiff
path: root/GNUmakefile.in
diff options
context:
space:
mode:
authorAlexander Korotkov2025-07-19 10:44:01 +0000
committerAlexander Korotkov2025-07-19 10:46:03 +0000
commit9f270f48f3fed358d62e13ec8c090124d47d86a0 (patch)
treebf218c1db61f6d0dc35644ff49d775f0267e9d57 /GNUmakefile.in
parenta372a64db794611e916a8281ee8269a4441713b0 (diff)
Fix infinite wait when reading a partially written WAL recordREL_15_STABLE
If a crash occurs while writing a WAL record that spans multiple pages, the recovery process marks the page with the XLP_FIRST_IS_OVERWRITE_CONTRECORD flag. However, logical decoding currently attempts to read the full WAL record based on its expected size before checking this flag, which can lead to an infinite wait if the remaining data is never written (e.g., no activity after crash). This patch updates the logic first to read the page header and check for the XLP_FIRST_IS_OVERWRITE_CONTRECORD flag before attempting to reconstruct the full WAL record. If the flag is set, decoding correctly identifies the record as incomplete and avoids waiting for WAL data that will never arrive. Discussion: https://postgr.es/m/CAAKRu_ZCOzQpEumLFgG_%2Biw3FTa%2BhJ4SRpxzaQBYxxM_ZAzWcA%40mail.gmail.com Discussion: https://postgr.es/m/CALDaNm34m36PDHzsU_GdcNXU0gLTfFY5rzh9GSQv%3Dw6B%2BQVNRQ%40mail.gmail.com Author: Vignesh C <vignesh21@gmail.com> Reviewed-by: Hayato Kuroda <kuroda.hayato@fujitsu.com> Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com> Reviewed-by: Michael Paquier <michael@paquier.xyz> Reviewed-by: Alexander Korotkov <aekorotkov@gmail.com> Backpatch-through: 13
Diffstat (limited to 'GNUmakefile.in')
0 files changed, 0 insertions, 0 deletions