Apr 2022

1 commit
Fix incorrect logic in HaveRegisteredOrActiveSnapshot().
16 Apr 2022Tom Lanemaster15beta1REL_19_STABLE15beta1REL_18_STABLE15beta1REL_17_STABLE15beta1REL_16_STABLE15beta1REL_15_STABLE15beta1
LLM analysis, 100% surewritten from the discussion, no matching patch2 of 4 reviewers saw the final version

The commit fixes HaveRegisteredOrActiveSnapshot() in src/backend/utils/time/snapmgr.c, following Robert Haas's inline diagnosis and correction #18 and Tom Lane's alternative formulation #25; none of the attached patches changes that function. It adds a different portals regression test covering ordinary and held cursors, without adopting the cursor snapshot propagation in #9.

  • Erik Rijkerssaw an earlier versionLLM analysis, 91% sureErik reported that the earlier attached fix #4 prevented the failure #6, before the approach changed substantially and the committed correction emerged inline.
  • Matthias van de Meentsaw an earlier versionLLM analysis, 86% sureMatthias proposed using STORAGE EXTERNAL to simplify the regression test #5, which informed #9, although the eventual inline fix used a different test and implementation.
  • Robert Haassaw the final versionLLM analysis, 98% sureRobert identified the incorrect multiple-snapshot condition, supplied an inline correction with the committed semantics, and reported that make check-world passed #18.
  • Andres Freundsaw the final versionLLM analysis, 82% sureBefore the commit, Andres reviewed Robert's snapshot-check diagnosis and discussed the limitations of moving the check or excluding CatalogSnapshot from GetOldestSnapshot() #19.

Credits across 1 commit

Committer
Tom Lane1