model-writtenrun 2955 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun 2023 · 1 entry
- Kaido Vaikla reported missing query IDs for JDBC queries in June 2023 #1, and Michael Paquier suggested recovering IDs from cached Query nodes #2; Dave Cramer revived the issue after another JDBC report in March 2024 #4.
Mar - May 2024 · 3 entries
- Sami Imseih traced the loss to activity reporting resetting the ID at each bind and execute message #5, then submitted a fix reporting IDs during bind and portal execution #9.
- Andrei Lepikhov demonstrated that object replacement can change a prepared query's ID #8, and Sami reproduced stale bind-stage IDs #13, leading to reporting after cached-query revalidation in #15.
- Andrei proposed resetting IDs after planning and execution #16, but Sami and Michael rejected that lifecycle change because idle sessions should retain the last query's ID and planning activity and log prefixes need useful IDs #17 #18.
Jul - Oct 2024 · 16 entries
- Anthonin Bonnefoy proposed reporting in ExecutorRun() and ProcessUtility() #24, and Michael attached that alternative while identifying the uncovered case of later fetches from an existing tuplestore #25.
- Sami moved reporting directly into bind and execute message processing #26, and Michael requested searching for a valid ID rather than assuming the first list entry and separating cache revalidation #27; Sami incorporated both changes in #31.
- Anthonin supplied a hook-based test module #28, while Michael considered background sessions and core assertions #29; Jian He then tested the protocol fix successfully and supplied compact bind-based checks #32.
- Andrei warned that forced reporting during revalidation could overwrite a top-level ID #34 and supplied an isolation-test sketch #35; Sami confirmed the overwrite problem and explored TAP testing because isolation tests cannot issue the required psql metacommands #36 #37.
- Michael assembled an ExecutorRun-based fix, separate execute-fetch reporting, and pg_stat_statements tests and assertions #40, preferring existing test infrastructure over duplicating query patterns in a custom module, isolation tests, or TAP tests.
- Sami argued that unconditional bind/execute reporting covered the same portal cases more directly, retained his protocol implementation, and changed cache-revalidation reporting to non-forced mode #41.
- After Sami endorsed the pg_stat_statements tests #41 #43, Michael committed their independent portion as 7b1ddbae36, with an additional unnamed-bind case and without the proposed assertions or direct query-ID check.
- Michael adopted Sami's bind/execute implementation, added the direct query-ID regression check, retained necessary ExecutorStart() reporting, and separated experimental core executor assertions in #46; Sami approved both patches #47.
- The protocol component of #46 landed unchanged as 933848d16d and was backpatched through PostgreSQL 14, while 24f5205948 landed the assertions on the development branch with the third check moved to ExecutorEnd(); Michael reported testing all five portal strategies #51.
- Reliable automated coverage for repeated execute-fetch messages remained an open testing problem #48, and Michael and Sami agreed to move the still-uncommitted cache-revalidation work to a separate thread #52 #54.
- Alexander Lakhin triggered the new assertion during an expression-index build #56, revealing that parallel btree workers lacked query IDs; Michael found the same omission in BRIN and vacuum workers and supplied shared-state propagation plus regression tests #57.
- Sami tested the parallel-worker patch and discussed whether its settings reliably requested workers #58 #61, after which Michael committed it with comment-only adjustments as 6fd5071909.
- Michael then found that the assertions incorrectly rejected disabled activity tracking and could reject contexts without query text, submitting a guarded macro and GUC tests #62 that landed with a comment adjustment as 5deb56387e.
- Alexander demonstrated another assertion failure involving bind, PREPARE, and EXECUTE inside a transaction #64, and Michael traced it to legitimate portal cleanup after the current query ID had been cleared, invalidating the finish and end assertions #65.
- Alexander also disproved the remaining ExecutorRun() assertion using procedures that changed compute_query_id and track_activities #68, leading Michael to abandon the assertion experiment #69 and remove the macro and all three checks in 4dd3087300.
- At the thread's close, the extended-protocol fix, parallel-worker propagation, and regression tests remained landed, the executor assertions were removed, and cache-revalidation work remained deferred to the separate discussion agreed in #54.