model-writtenrun 9534 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov - Dec 2018 · 3 entries
- Paul Ramsey proposed stopping TOAST decompression once a requested leading slice was available, reporting a reduction from roughly 1.4 seconds to 47 milliseconds in a substring benchmark #1.
- Stephen Frost proposed allocating only the needed output and supporting nonzero offsets, while Tom Lane recommended decompressing the prefix and discarding unwanted leading bytes to avoid complicating the inner loop; Paul implemented that approach #2 #4 #5.
- Paul added a companion optimization for left(), and Rafia Sabih's review led to clearer comments about partial-decompression checks and corrected declaration formatting #6 #7 #8.
Feb - Apr 2019 · 11 entries
- Discussion resumed in February when Simon Riggs asked for JSONB support; Paul explained that unknown-length searches would need broader changes, while Andres Freund, Robert Haas, Tom Lane, and Tomas Vondra supported accepting useful fixed-length slicing without waiting for an iterator or a redesigned compression format #10 #11 #14 #19 #22 #23.
- Daniel Verite identified starts_with() as another suitable caller, Stephen Frost accepted proceeding independently of iterator work, and Paul added the prefix optimization in an updated submission #18 #24 #25.
- Darafei Praliaskouski reported successful feature testing, and Regina Obe reported successful Windows mingw64 checks and substantial left() and substr() performance improvements #26 #28.
- Andrey Borodin questioned per-byte bound checks, while Michael Paquier raised compatibility concerns about changing pglz_decompress(); Paul explained why partial decompression cannot require both buffers to be exhausted and temporarily preserved the old signature through a checked implementation #29 #30 #36 #42.
- Andrey supplied an inline change that caps the copy length before the byte loop, and Paul incorporated it into the combined patch #43 #44.
- Stephen Frost, Tom Lane, and Robert Haas supported changing this internal API across a major release, so Paul removed the wrapper and submitted a single pglz_decompress() function with a check_complete argument #45 #46 #47 #48.
- Stephen's final review added API documentation and removed a redundant output-size assignment; after Paul's explanation of potentially oversized slice requests, Stephen retained strict completeness checks for callers requesting full decompression #49 #50 #51.
- Stephen committed Paul's final submission with those light edits as 4d0e994eed, including partial TOAST decompression and its left() and starts_with() callers, and announced that it had been pushed #48 #53.
- After the slicing commit, Andrey Borodin posted a separate optimization based on Vladimir Leskov's suggestion to expand matches through nonoverlapping memcpy() calls of increasing size, reporting a further 20–25% decompression speedup on synthetic tests #54.
- Paul questioned portability and Andres Freund suggested memmove(), but Andrey and Tom Lane explained that decompression needs newly copied bytes to feed subsequent expansion; Tom also suggested retaining bytewise copying for short matches #55 #57 #58 #59.
- At the thread's end, slicing had landed and the memcpy() follow-up remained under investigation: Andrey reported about 20% faster decompression on pgbench-generated WAL using a short-match cutoff and said further work would follow #60.