Jul 2022

6 commits
Split tuplesortvariants.c from tuplesort.c
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #191 of 5 reviewers saw the final version

All 22 hunks match the sixth patch in #19, including the Makefile change, tuplesortvariants.c extraction and public declarations in src/include/utils/tuplesort.h.

  • Pavel Borisovsaw the final versiontrailerPavel supplied macro and field-access corrections in #15, then approved and reported successful builds and tests of the final series in #20.
  • Maxim Orlovsaw an earlier versiontrailerMaxim supplied macro fixes in #4 and endorsed the series in #7, before callback, interface and parallel-sort logic changes.
  • Matthias van de Meentsaw an earlier versiontrailerMatthias considered the extraction otherwise fine but requested a commit message in #8, before changes to the extracted callbacks and parallel-sort handling.
  • Andres Freundsaw an earlier versiontrailerAndres questioned lost cross-function optimization and requested performance evaluation in #9, before the interface revisions and parallel-sort fixes.
  • John Naylorsaw an earlier versiontrailerJohn reported no performance slowdown in #13, before subsequent null-coordinate, worker-semantics and field-access fixes in the extracted code.
Split TuplesortPublic from Tuplesortstate
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #191 of 5 reviewers saw the final version

All 119 hunks match the fifth patch in #19, splitting TuplesortPublic in src/backend/utils/sort/tuplesort.c and updating src/tools/pgindent/typedefs.list.

  • Pavel Borisovsaw the final versiontrailerPavel corrected PARALLEL_SORT and base->nKeys in #15 and confirmed the final series built and tested successfully in #20.
  • Maxim Orlovsaw an earlier versiontrailerMaxim reviewed the original interface split in #4 and endorsed the series in #7, before public-interface revisions and parallel-sort fixes.
  • Matthias van de Meentsaw an earlier versiontrailerMatthias requested documentation for the public structure and its fields in #8, before interface revisions and parallel-sort corrections.
  • Andres Freundsaw an earlier versiontrailerAndres challenged the purpose and Ops naming of the public structure in #9, before the TuplesortPublic revision and later logic fixes.
  • John Naylorsaw an earlier versiontrailerJohn benchmarked the revised series without finding a slowdown in #13, before PARALLEL_SORT null handling, worker semantics and base->nKeys were corrected.
Move memory management away from writetup() and tuplesort_put*()
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #192 of 5 reviewers saw the final version

All 17 hunks match the fourth patch in #19, centralizing memory accounting, context switching and tuple freeing in src/backend/utils/sort/tuplesort.c.

  • Pavel Borisovsaw the final versiontrailerPavel reviewed the revised series in #15 and reported successful final builds and tests in #20.
  • Maxim Orlovsaw an earlier versiontrailerMaxim reviewed and endorsed the initial series in #4 and #7, before the write-wrapper and index-tuple context-management revision.
  • Matthias van de Meentsaw an earlier versiontrailerMatthias considered this patch otherwise fine but requested a commit message in #8, before revisions to its write-wrapper and context-management plumbing.
  • Andres Freundsaw an earlier versiontrailerAndres identified the broader memory-accounting scope and questioned added branching in #9, prompting the revision in #12.
  • John Naylorsaw the final versiontrailerJohn reported no benchmark slowdown in #13, and this component's code remained unchanged through the final submission.
Put abbreviation logic into puttuple_common()
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #192 of 5 reviewers saw the final version

All nine hunks match the third patch in #19, moving abbreviation handling into puttuple_common() with an explicit useAbbrev argument.

  • Pavel Borisovsaw the final versiontrailerPavel reviewed the revised series in #15 and approved the final version after successful builds and tests in #20.
  • Maxim Orlovsaw an earlier versiontrailerMaxim endorsed the initial series in #4 and #7, before abbreviation selection moved to an explicit caller-supplied flag.
  • Matthias van de Meentsaw an earlier versiontrailerMatthias questioned duplicated datum extraction in #8, before the explicit abbreviation flag and batched callback revision.
  • Andres Freundsaw an earlier versiontrailerAndres proposed passing abbreviation flags to reduce common-code branching in #9, which the author implemented in #12.
  • John Naylorsaw the final versiontrailerJohn found no performance regression in #13, with only intermediate-build cleanup affecting this patch afterward.
Add new Tuplesortstate.removeabbrev function
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #192 of 5 reviewers saw the final version

All 21 hunks match the second patch in #19, introducing batched removeabbrev callbacks and removing the obsolete loop variables in src/backend/utils/sort/tuplesort.c.

  • Pavel Borisovsaw the final versiontrailerPavel reviewed the revised callbacks in #15 and explicitly verified that the first two final patches built without warnings in #20.
  • Maxim Orlovsaw an earlier versiontrailerMaxim reviewed and endorsed the initial series in #4 and #7, before per-tuple getdatum1 became batched removeabbrev.
  • Matthias van de Meentsaw an earlier versiontrailerMatthias requested a clearer callback name and documentation in #8, before its conversion to the batched removeabbrev interface.
  • Andres Freundsaw an earlier versiontrailerAndres objected to additional indirect calls in #9, leading the author to batch tuple processing in #12.
  • John Naylorsaw the final versiontrailerJohn benchmarked the batched implementation in #13, after which only comment placement and unused-variable cleanup changed this component.
Remove Tuplesortstate.copytup function
27 Jul 2022Alexander Korotkovmaster16beta1REL_19_STABLE16beta1REL_18_STABLE16beta1REL_17_STABLE16beta1REL_16_STABLE16beta1
LLM analysis, 100% surelanded as postedfrom patchset #195 of 5 reviewers saw the final version

All 17 hunks match the first patch in #19, removing copytup and moving its work into tuplesort_put*() in src/backend/utils/sort/tuplesort.c.

  • Pavel Borisovsaw the final versiontrailerPavel reviewed the revised series in #15 and verified the final first-two-patch build and tests in #20.
  • Maxim Orlovsaw the final versiontrailerMaxim reviewed and endorsed the series in #4 and #7, and the copytup-removal patch subsequently received only explanatory and formatting changes.
  • Matthias van de Meentsaw the final versiontrailerMatthias requested an explanation for removing copytup in #8, which was supplied without changing the implementation.
  • Andres Freundsaw the final versiontrailerAndres supported removing the unnecessary copytup abstraction in #9, and its implementation remained unchanged apart from comment formatting.
  • John Naylorsaw the final versiontrailerJohn reported no performance slowdown in #13, and only comment formatting changed this component afterward.

Credits across 6 commits

Author
Alexander Korotkov6
Reviewer
Andres Freund6
John Naylor6
Matthias van de Meent6
Maxim Orlov6
Pavel Borisov6
Committer
Alexander Korotkov6