Oct - Nov 2021

4 commits
Doc: add some notes about performance of the List functions.
6 Nov 2021Tom Lanemaster15beta1REL_19_STABLE15beta1REL_18_STABLE15beta1REL_17_STABLE15beta1REL_16_STABLE15beta1REL_15_STABLE15beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #371 of 1 reviewer saw the final version

The commit retains the performance annotations from #37, expands list_delete_first() advice to explain efficient stacks versus FIFO queues, and removes the list_delete_last() complexity paragraph. These comment-only edits follow Andres Freund's suggestion in #38 and Tom Lane's wording in #39.

  • Andres Freundsaw the final versionLLM analysis, 100% sureAndres supported the documentation patch and suggested mentioning list_delete_last() in #38, then approved the revised wording in #40 before commit.
Avoid O(N^2) behavior in SyncPostCheckpoint().
2 Nov 2021Tom Lanemaster15beta1REL_19_STABLE15beta1REL_18_STABLE15beta1REL_17_STABLE15beta1REL_16_STABLE15beta1REL_15_STABLE15beta1REL_14_STABLE14.1REL_13_STABLE13.5
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #260 of 2 reviewers saw the final version

The commit preserves #26's canceled-entry mechanism and list_delete_first_n() implementation, but checks cancellation before cycle_ctr in src/backend/storage/sync/sync.c. It also replaces list_copy_tail() with the new primitive in src/backend/optimizer/util/clauses.c and src/backend/parser/parse_func.c.

  • Kyotaro Horiguchisaw an earlier versionLLM analysis, 99% sureKyotaro reviewed #26 and requested checking canceled entries before cycle_ctr in #29, which Tom accepted in #30, while the final commit also added two unreviewed call-site conversions.
  • Nathan Bossartsaw an earlier versionLLM analysis, 87% sureNathan proposed bulk deletion through list_delete_first_n() in #21, which Tom adopted in #26, but this design review preceded the attached checkpoint implementation.
Avoid some other O(N^2) hazards in list manipulation.
1 Nov 2021Tom Lanemaster15beta1REL_19_STABLE15beta1REL_18_STABLE15beta1REL_17_STABLE15beta1REL_16_STABLE15beta1REL_15_STABLE15beta1REL_14_STABLE14.1REL_13_STABLE13.5
LLM analysis, 100% surelanded as postedfrom patchset #241 of 2 reviewers saw the final version

All hunks match #24 exactly apart from abbreviated index hashes: pg_trgm and LLVM cleanup use foreach(), while hash aggregation pushes and pops at the list's end.

  • Nathan Bossartsaw the final versionLLM analysis, 100% sureNathan questioned pg_trgm queue cleanup in #21, accepted the explanation in #23, and approved the expanded patch in #25 before commit.
  • Kyotaro Horiguchisaw an earlier versionLLM analysis, 97% sureKyotaro examined keysQueue cleanup in #18 before the aggregation and JIT changes were attached, while his subsequent approvals in #27 and #28 came after this commit.
Avoid O(N^2) behavior when the standby process releases many locks.
31 Oct 2021Tom Lanemaster15beta1REL_19_STABLE15beta1REL_18_STABLE15beta1REL_17_STABLE15beta1REL_16_STABLE15beta1REL_15_STABLE15beta1REL_14_STABLE14.1REL_13_STABLE13.5
LLM analysis, 100% surelanded as postedfrom patchset #15 of 5 reviewers saw the final version

Both standby.c hunks match #1 exactly apart from abbreviated index hashes, and Tom explicitly reported pushing the patch as given in #15.

  • Amul Sulsaw the final versionLLM analysis, 99% sureAmul endorsed freeing the list at once and explained the unnecessary element shifting in #2.
  • Kyotaro Horiguchisaw the final versionLLM analysis, 99% sureKyotaro endorsed the standby fix and identified analogous list-processing loops in #3.
  • Michael Paquiersaw the final versionLLM analysis, 100% sureMichael reported reproducing the performance gap and recommended backpatching in #4, then examined error-path memory handling in #13.
  • Andres Freundsaw the final versionLLM analysis, 85% sureAndres examined interruption safety and suggested deleting from the tail in #6 and #7, later agreeing against changing lock-release order in #12.
  • Tom Lanesaw the final versioncommittercommitted the patch

Credits across 4 commits

Author
Tom LaneLLM3
Nathan BossartLLM1
Reviewer
Tom Lanecommitter1
Committer
Tom Lane4

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