model-writtenrun 6006 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jul - Nov 2021 ยท 21 entries
- Ronan Dunklau opened the thread because pg_receivewal could skip retained WAL when its archive directory had been emptied, proposing that a replication slot supply the restart position instead of immediately using the server's current flush position #1.
- Kyotaro Horiguchi supported making slot-based restart the default with --slot #2, and persuaded Ronan that a read-only replication command was sufficient without acquiring the slot, provided it also returned the historical timeline needed for restart #3 #4.
- Ronan's first implementation added READ_REPLICATION_SLOT with physical and logical slot information and taught pg_receivewal to consult it after scanning local archives, while retaining the server position as a fallback #5.
- After a month, Ronan moved the client helper into streamutil.c and added an early slot-existence check for pg_basebackup, expanding the submission to three patches #6.
- Michael Paquier and Bharath Rupireddy reviewed missing-slot behavior, result fields, diagnostics and test coverage #7 #8 #11 #12, leading to protocol tests and a new node-aware command_fails_like helper in Ronan's revision #9.
- Michael extracted the unchanged Perl helper from #9 into de1d4fef71, then supplied a revised server patch that returned an all-NULL tuple for a missing slot and simplified result construction #14 #19.
- Bharath and Kyotaro debated controls for choosing the starting source, while Ronan emphasized documenting the existing behavior and possibly adding an explicit starting LSN separately #15 #16 #17 #18.
- Ronan incorporated Michael's server revision and introduced a client result structure and status enum #22, but Michael argued for fewer fields, simpler error handling, documented fallback order and relying on backend safeguards rather than speculative frontend checks #21 #24.
- After the work was returned with feedback and a several-week gap, Ronan resumed with physical-slot support only, three returned fields and a simpler boolean client API; he dropped the pg_basebackup extension because another solution addressed that problem and added startup-order documentation #29 #30.
- Michael's next review led to proper user-facing errors, stronger result validation and cheaper slot tests #31 #32, after which Ronan added tests for timeline switches using both directory-based and slot-based restart #33.
- Michael separated documentation of existing behavior from the new feature so it could be backpatched, clarified compressed-segment handling and removed redundant protocol tests #34; Ronan incorporated that split into the complete series #37.
- The existing-behavior documentation from #37 landed with small wording edits as 1e9475694b and was backpatched, as Michael reported in #38.
- Before landing the server command, Michael widened the timeline result to int8 and fixed standby operation to use the replay timeline instead of ThisTimeLineID #38; Bharath reviewed that version and requested the slot name in logical-slot errors #39 #43.
- The server patch from #38 landed as b4ada4e19f with the requested diagnostic and corresponding test adjustment, and Michael confirmed its application in #44.
- Michael next revised the remaining client patch to preserve older-server fallback and simplify its tests #45, while Ronan proposed moving version detection to the caller so the shared helper had unambiguous semantics #51 #52.
- The resulting client patch #54 received a final pointer-guard correction identified by Bharath #55 and landed as f61e1dd2ce, establishing the order local archives, slot restart position on supported servers, then server flush position #56.
- With the feature committed, Ronan rewrote the remaining timeline tests to share one standby and verify old-timeline WAL, new-timeline WAL and the history file #58; Kyotaro identified an unused variable and end-position stalls, which the corrected submission addressed #59 #60 #61 #62.
- Michael independently proposed smaller WAL segments, a checkpoint before slot creation and extra WAL after the stopping position to accelerate existing tests, and recommended dropping the expensive directory-based timeline scenario because it did not meaningfully distinguish the restart sources #63.
- Ronan accepted the narrower timeline coverage, measured the speedup and extended Michael's optimization to single-row inserts #64; that speedup component landed as d680992af5 with a primary key and distinct values added for debugging #65.
- Ronan adapted the remaining timeline test to the committed data changes, replaced an unnecessary WAL switch with a lookup of the slot's restart segment and used the standby promotion helper #66.
- Michael replaced the final explicit slot query with the existing slot() helper, polished comments and assertions, and committed #66 as 0f9b9938a0; his last message states that all retained work in the thread is complete #67.