Feb - Mar 2020

10 commits
Fix costing for disk-based hash aggregation.
28 Mar 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% surewritten from the discussion, no matching patch

Richard reports negative spill costs in #79, and Tomas proposes rounding nbatches in #80. The commit implements that fix with additional partition-count guards and initialization, explained in #81; no attachment contains it.

Fixes for Disk-based Hash Aggregation.
23 Mar 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% surewritten from the discussion, no matching patch

Responds to Justin's post-commit += and integer-width observations in #76, fixing totalGroups accumulation and EXPLAIN's memory counter. It also adjusts hash-entry estimates and bucket limits without an attached fix patch.

Disk-based Hash Aggregation.
18 Mar 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% suremodified before commitmoderate changesfrom patchset #730 of 5 reviewers saw the final version

Matches the final attachment across its files, with local nodeAgg.c edits: raises the maximum partitions to 1024, initializes recursive spill state only when needed, and skips transition evaluation for spilled tuples. Comments and cleanup also change.

  • Tomas Vondrasaw an earlier versiontrailerTomas reviewed code, benchmarked the implementation, reported crashes in #59, and confirmed fixes in #68, before later expression and memory-management changes.
  • Adam Leesaw an earlier versiontrailerAdam jointly reviewed partition accounting, tested projection and logical-tape prototypes, and investigated crashes in #60 and #61, before substantial later revisions.
  • Justin Pryzbysaw an earlier versiontrailerJustin's detailed review in #72 caught buffer accounting and documentation issues, followed by metadata-context changes and additional spill-loop edits before commitment.
  • Taylor Veselysaw an earlier versiontrailerTaylor reviewed and rebased the early implementation in #12, questioning skew handling and fixed partition counts before the later storage and execution rework.
  • Melanie Plagemansaw an earlier versiontrailerMelanie participated in the early joint review, analyzed partition sizing in #16, and helped test the projection delta in #24, before the later logical-tape rework.
Extend ExecBuildAggTrans() to support a NULL pointer check.
5 Mar 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 99% surepart of a posted patchsetlight changesfrom patchset #700 of 2 reviewers saw the final version

Extracts the optional per-group NULL-check step from #70, including execExpr.c, execExprInterp.c, llvmjit_expr.c, and executor declarations. Differences are generalized comments and the standalone nodeAgg.c call-site adjustment.

  • Tomas Vondrasaw an earlier versionLLM analysis, 92% sureTomas questioned the spilling opcodes and requested argument documentation in #59, before the implementation became a separate NULL-check step.
  • Andres Freundsaw an earlier versionLLM analysis, 91% sureAndres analyzed opcode dispatch costs and proposed evaluator changes in #63 that Jeff adopted in #70, substantially simplifying this prerequisite.
Save calculated transitionSpace in Agg node.
27 Feb 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 97% surepart of a posted patchsetmoderate changesfrom patchset #70

Extracts transitionSpace propagation through AggPath, GroupingSetsPath, make_agg(), and Agg, first isolated in #48 and still present in #70. The committed fields and arguments use Size instead of int32, with revised comments.

expression eval: Reduce number of steps for agg transition invocations.
24 Feb 2020Andres Freundmaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1Also in: WIP: expression evaluation improvements (part of a posted patchset)
Minor refactor of nodeAgg.c.
19 Feb 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% suremodified before commitlight changesfrom patchset #53

The standalone nodeAgg.c refactoring matches #53 in executable changes. The commit clarifies prepare_hash_slot's purpose and removes an inaccurate memory-context comment.

Logical Tape Set: lazily allocate read buffer.
13 Feb 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 99% surepart of a posted patchsetmoderate changesfrom patchset #52

Extracts lazy read-buffer allocation from the latest combined patch #52, retaining ltsInitReadBuffer() and its read/backspace/seek callers. The commit additionally initializes the buffer in LogicalTapeTell().

Introduce TupleHashTableHash() and LookupTupleHashEntryHash().
7 Feb 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% surepart of a posted patchsetmoderate changesfrom patchset #480 of 1 reviewer saw the final version

Takes the tuple-hash API member of #48, leaving its two other prerequisites out. It moves hash/match-state initialization from the internal helper into LookupTupleHashEntryHash(), adjusts declarations, and documents memory-context behavior.

  • Tomas Vondrasaw an earlier versionLLM analysis, 87% sureTomas specifically requested documentation for LookupTupleHashEntryHash() and related hash helpers in #15, which Jeff addressed before the API extraction and subsequent internal rearrangement.
Logical Tape Set: use min heap for freelist.
6 Feb 2020Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 100% surepart of a posted patchsetlight changesfrom patchset #440 of 1 reviewer saw the final version

Exactly matches the min-heap freelist member of #44 modulo whitespace and base context. Lazy buffers and tape-set extension from that series are excluded.

  • Peter Geoghegansaw an earlier versionLLM analysis, 98% surePeter identified heap-index overflow and MaxAllocSize risks in #41, prompting unsigned offsets and an allocation guard in #44.

Dec 2019

1 commit
Fix comments in execGrouping.c
6 Dec 2019Jeff Davismaster13beta1REL_19_STABLE13beta1REL_18_STABLE13beta1REL_17_STABLE13beta1REL_16_STABLE13beta1REL_15_STABLE13beta1REL_14_STABLE13beta1REL_13_STABLE13beta1
LLM analysis, 99% surepart of a posted patchsetlight changesfrom patchset #171 of 1 reviewer saw the final version

Extracts the execGrouping.c comment correction and execnodes.h typo from #17, as proposed in #21. The commit preserves useful explanatory wording and also removes a stale TupleHashTableMatch comment.

  • Tomas Vondrasaw the final versionLLM analysis, 90% sureTomas questioned the TupleHashTableHash comment deletion in #15, prompting Jeff's investigation and the lightly revised standalone correction.

Credits across 11 commits

Author
Jeff Davis6 LLM8
Andres Freund1
Reviewer
Adam Lee1
Justin Pryzby1
Melanie Plageman1
Taylor Vesely1
Tomas Vondra1
Committer
Jeff Davis10
Andres Freund1

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