model-writtenrun 4782 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov 2022 - Jan 2023 ยท 20 entries
- Nathan Bossart proposed waking logical replication workers at transaction commit after ALTER SUBSCRIPTION because reducing periodic worker wakeups exposed slow subscription tests, and his initial patch already improved test runtimes #1.
- Thomas Munro and Hayato Kuroda questioned the single stored subscription OID, leading Nathan to track multiple subscriptions in TopTransactionContext and move the implementation into logical/worker.c #2 #4 #5.
- Hayato Kuroda, Takamichi Osumi, and Zhijie Hou identified duplicate registrations, subtransaction-related unnecessary wakeups, and the need to retain notifications for REFRESH PUBLICATION; Nathan deduplicated the list and registered notifications after successful command processing while accepting harmless extra wakeups #6 #7 #8 #10.
- After Nathan found more dependencies on periodic wakeups, Thomas Munro argued that those delays deserved fixing independently, and Nathan expanded the patch to cover renames and readiness for two_phase mode #14 #15 #18 #19.
- Melih Mutlu found that the rename hook affected unrelated object types and questioned broad relation-state notifications; successive corrections restricted renames to subscriptions and ultimately checked two_phase readiness at the end of table synchronization processing #21 #22 #23 #24 #25.
- Tom Lane measured improvements but found substantial remaining delays when restarting apply workers; discussion traced these to the launcher's global wal_retrieve_retry_interval throttle, and Tom proposed bypassing the delay for intentional reconfiguration exits #26 #29 #31 #35.
- Nathan nevertheless explored lowering the test retry interval to 1ms, which exposed a WAL-receiver restart race; he added a postmaster sleep-time workaround alongside the original wakeup patch and test-setting change #37.
- The lower test interval also exposed Windows archiving failures, so Nathan added a patch ensuring WaitLatch() still dispatched queued signals when the retry interval had already elapsed #38 #39.
- Amit Kapila and Nathan considered a global restart-bypass flag versus per-subscription tracking, and Nathan replaced the timeout-test experiment with a launcher hash table and a restart_immediately flag in worker slots #40 #45 #47 #48.
- Amit questioned why an already-running apply worker should wake itself and examined catalog-state visibility; Nathan then moved the two_phase restart check to the end of process_syncing_tables_for_apply(), avoiding another loop iteration #44 #49 #51.
- Amit objected to repeated hash-table garbage collection and retained worker slots and suggested dshash; Nathan adopted a dynamic shared hash table so backends could directly remove restart timestamps without those mechanisms #52 #55 #56.
- At Amit's request, Nathan split the independently useful two_phase change into its own patch and expanded timestamp deletion to cover additional worker exit paths #57 #58.
- Tom committed the two_phase component of #58 as 4c032dd804, additionally restricting CommandCounterIncrement() to pending two_phase mode.
- Tom committed the DDL-wakeup component of #58 as c6e1f62e2c, adding cleanup that discards pending launcher and worker notifications during PREPARE rather than preserving them for COMMIT PREPARED.
- Tom reposted the remaining shared-timestamp patch after those commits but questioned its complexity, while Nathan said the recovery bugs exposed by the 1ms experiment would be pursued in a separate thread #59 #60.
- Nathan rebased the remaining patch for parallel apply workers, and Amit endorsed the shared-table approach while requesting clearer rate-limiting comments and checking launcher notification behavior; Nathan updated the comments and explained the existing exit notifications #61 #62 #63.
- Tom committed #63 as 5a3a95385b, retaining the shared-table design while revising names, documentation, attachment handling, locking, and timestamp calculations, and marked the commitfest entry committed #64.
- Zhijie Hou then supplied a cleanup for treating a dshash handle as a DSM handle; Nathan and Tom favored dedicated invalid-value macros that concealed each handle type's representation #66 #67 #68.
- Nathan posted the macro-based cleanup, and Kyotaro Horiguchi identified two overlooked uses in dsa.c; Tom incorporated those fixes, moved DSM_HANDLE_INVALID beside its typedef, and committed the expanded patch as 3b4ac33254 #69 #70 #71.
- The thread ends with Nathan acknowledging the final cleanup, leaving all three logical-worker changes and the handle cleanup committed; the experimental recovery fixes and lower test timeout were not part of these landings, and no further patch remains under review in this thread #60 #64 #72 #73.