Jun 2021

2 commits
Another fix to relmapper race condition.
24 Jun 2021Heikki Linnakangasmaster14beta3REL_19_STABLE14beta3REL_18_STABLE14beta3REL_17_STABLE14beta3REL_16_STABLE14beta3REL_15_STABLE14beta3REL_14_STABLE14beta3REL_13_STABLE13.4+4 more
LLM analysis, 100% surewritten from the discussion, no matching patch2 of 2 reviewers saw the final version

The commit adds exclusive RelationMappingLock protection around write_relmap_file() in relmap_redo(), which neither attached patch contains. Thomas Munro identified this omission in #3 and repeated it after the first landing in #14; Heikki confirmed the correction in #15.

  • Thomas Munrosaw the final versionLLM analysis, 100% sureThomas identified the missing relmap_redo() locking and misleading comment in #14, directly prompting the committed correction.
  • Michael Paquiersaw the final versionLLM analysis, 87% sureMichael reinforced that the locking requirement should cover callers of write_relmap_file() in #6, supporting the correction to the WAL replay writer.
Prevent race condition while reading relmapper file.
24 Jun 2021Heikki Linnakangasmaster14beta3REL_19_STABLE14beta3REL_18_STABLE14beta3REL_17_STABLE14beta3REL_16_STABLE14beta3REL_15_STABLE14beta3REL_14_STABLE14beta3REL_13_STABLE13.4+4 more
LLM analysis, 100% suremodified before commitlight changesfrom patchset #23 of 3 reviewers saw the final version

The executable changes in src/backend/utils/cache/relmapper.c match #2, including the lock_held argument, caller updates, and shared lock around read(). The commit only revises the explanatory comment to remove the claim that small concurrent reads and writes should be atomic.

  • Alexander Lakhinsaw the final versionLLM analysis, 100% sureAlexander tested #2 with fsync disabled and reported three successful twenty-iteration runs in #5, whereas the unpatched server failed on the first iteration.
  • Thomas Munrosaw the final versionLLM analysis, 100% sureThomas endorsed read/write locking and identified the additional WAL replay locking requirement in #3, then explicitly supported proceeding with the fix in #12.
  • Michael Paquiersaw the final versionLLM analysis, 94% sureMichael supported adding the lock even if the behavior proved to be a kernel bug and examined writer coverage and existing control-file locking in #6.

Credits across 2 commits

Author
Heikki LinnakangasLLM1
Committer
Heikki Linnakangas2

N LLM means N of the credits come from LLM analysis, not from commit trailers.