model-writtenrun 4732 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Aug - Nov 2022 · 10 entries
- Bharath Rupireddy proposed making WAL pre-padding in pg_receivewal and pg_basebackup retry partial writes like the backend, and Michael Paquier supported sharing the existing retry helper #1 #2 #3.
- Thomas Munro requested a separate mechanical relocation patch, safer size arguments, clearer naming, and removal of unnecessary ENOSPC guessing; Bharath incorporated these changes into a two-patch series #4 #5.
- Thomas identified missing trailing-byte handling, while experiments found no clear benefit from larger zero buffers; Nathan Bossart then requested simpler buffer definitions and errno handling, producing a revised and rebased series #7 #10 #11 #13.
- Windows tests showed that positioned writes still changed the current file position, and Thomas confirmed this behavior despite misleading platform documentation #13 #15 #16.
- The proposed workaround of resetting position inside every Windows write wrapper was rejected because most callers did not need the extra system calls; Thomas instead restored the pg_ naming warning and documented the portability limitation in b6d8a60aba, following Bharath's review of the unindexed proposal #18 #21 #22 #23.
- Bharath simplified sparse WAL initialization to write one zero byte, and Nathan and Thomas persuaded him to retain an unconditional lseek() in walmethods.c for portability; Nathan approved the revised series #26 #27 #28 #29 #30.
- Michael committed the relocation component of #29 as 4ab8c81bd9, then requested a more general zero-writing interface; Bharath resubmitted the remainder with caller-supplied buffers #31 #32.
- Andres Freund opposed caller-supplied buffers and unnecessary aligned-block types, so the helper returned to managing its own buffer and ultimately used PGAlignedBlock #33 #35 #37 #38.
- Alvaro Herrera separately proposed replacing the file_utils.h forward declaration with an include, but Michael and Bharath identified problems and Bharath opposed the additional header dependency; this cleanup was not incorporated into the supplied commits #39 #40 #41.
- Michael split the final submission #42 into 3bdbdf5d06, introducing pg_pwrite_zeros() and its backend caller, and 28cc2976a9, converting walmethods.c; only comments and formatting changed within the selected portions #43 #46.
Feb - Mar 2023 · 7 entries
- In February, Andres reopened the thread because the committed helper still zeroed its buffer on every call; Bharath offered static and static-const alternatives, then added one-time initialization of a static iovec array #48 #49 #50 #52.
- Kyotaro Horiguchi found that the static iovec retained a shortened length after a partial-block write, while Andres requested selective initialization, combined writes, and an offset argument for additional uses; Bharath addressed these concerns in a more elaborate revision #53 #54 #55 #57.
- Andres supplied a simpler rewrite that builds only the needed iovecs and includes trailing bytes in the same write batch; Kyotaro preferred Bharath's size-before-offset argument order, which Andres accepted #59 #61 #62.
- Bharath submitted an alternative derived from his own earlier implementation to reduce repeated iovec initialization, but subsequent discussion and benchmarks favored Andres's simpler version with the corrected argument order #63 #67 #68 #69.
- After further tmpfs testing, Michael committed Andres's #59 as ce340e530d, changing argument order and explanatory comments while preserving the rewrite #70.
- The new static initializer triggered an old GCC warning on the lapwing buildfarm animal; Thomas reported it and then acknowledged that the initializer had already been corrected, while Michael described the compiler bug and simple fix #72 #73 #74.
- The functional work had landed by the end of the thread, whose remaining discussion concerned maintaining old 32-bit buildfarm systems and treating old compiler warnings as errors; participants proposed upgrades or parallel configurations, and Andres continued to oppose accommodations for decade-old compiler warnings #77 #79 #80.