model-writtenrun 4147 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Jun - Aug 2023 ยท 22 entries
- Masahiro Ikeda proposed custom extension wait-event names to make bottlenecks distinguishable in pg_stat_activity, initially using startup-time tranche requests, a demonstration extension, and documentation in #1.
- Michael Paquier recommended dynamic allocation and registration APIs modeled on LWLocks in #2, while Tristan Partin reviewed naming, types, and documentation in #4; Masahiro accepted the dynamic design in #6.
- After resolving how a background worker could appear in pg_stat_activity, Masahiro replaced the startup-only design with dynamic IDs and per-process name registration in #13, then fixed Meson integration and compiler warnings in #14 and #15.
- Michael tested the APIs in his extensions, rebased onto generated wait-event definitions, combined implementation and tests, and supplied naming and preload-safety improvements in #16, while requesting usage documentation.
- Andres Freund questioned tranche terminology, reused spinlocks, missing overflow protection, and the test design in #19, prompting Masahiro to revise the API names and allocation safeguards.
- While checking the rebase, Masahiro submitted a separate generator-validation cleanup in #21; Michael simplified it further and committed c17164aec8, explaining the removal of unnecessary exceptions in #25.
- Masahiro incorporated the dedicated spinlock, overflow errors, documentation, and broader registration tests in #28, then corrected SQL argument and result types after CI feedback in #29; contrib adoption was deliberately deferred until the APIs landed.
- Bharath Rupireddy recommended using worker_spi instead of a dedicated test extension in #31, and Michael implemented that replacement with rewritten documentation and coverage for dynamic and preloaded workers in #35.
- Michael diagnosed the Windows failure as an EXEC_BACKEND shared-memory attachment bug and corrected initialization in #37, also adding a lock assertion and temporarily changing unregistered names to the question-mark fallback.
- Bharath's review in #38 led Michael to restore the extension fallback, turn registration assertions into errors, improve naming and examples, and introduce reusable masks in #39; bulk allocation was left for possible future work.
- Michael extracted the mask helpers from #39 into 7395a90db8, then posted the remaining feature with small comment corrections in #43.
- The initial custom-event API landed from #43 essentially unchanged as c9af054653, with Michael confirming the application in #47.
- When follow-up discussion exposed difficulties using the API in dblink and postgres_fdw without preloading, Andres argued in #52 that a shared name table would avoid requiring every observing backend to load the extension.
- Ranier Vilela reported duplicate enum definitions after updating in #53; Masahiro identified a stale generated header in #54, and Ranier confirmed that removing it resolved the build failure in #55.
- Michael outlined shared-hash storage and a single registration call in #57, while Masahiro proposed a second index keyed by name to avoid duplicate allocations in #58; Masahiro accidentally attached a dshash prototype in #60 and withdrew it in #61.
- Andres recommended ordinary shared dynahash tables and NAMEDATALEN-sized names in #63, and Masahiro implemented two indexes, removed worker_spi_init(), and supplied a dblink demonstration in #66.
- Andres rejected requiring callers to acquire AddinShmemInitLock in #67, and Michael identified a duplicate-insertion race, incorrect shared-memory sizing, missing lock documentation, and unnecessary extension-side state in #68.
- Masahiro addressed those findings in #69, adding an exclusive-lock recheck before insertion, correcting string-key hashing, and simplifying worker_spi and the dblink demonstration.
- Michael posted the polished shared-hash patch in #71, reducing the initial and maximum hash sizes to 16 and 128 entries and omitting the dblink demonstration; Masahiro reported passing tests in #72.
- The shared-hash redesign landed from #71 as af720b4c50 with small comment, formatting, and allocation-size cleanups, replacing the first implementation without a revert.
- Masahiro inventoried remaining contrib and test-module adoption sites and proposed names such as DblinkConnect in #74; Michael requested module-specific documentation and a separate discussion in #75.
- By the end of the thread, both API phases and the two supporting cleanups had landed, while module adoption and naming remained follow-up work that Masahiro agreed to move to a new thread in #76, acknowledged in #77.