model-writtenrun 9888 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro reported that parallel workers inherited identical random() sequences, causing harmless DSM handle collisions, and proposed moving seed initialization into common child startup in #1, followed by the first patch in #2.
- Tom Lane pointed out that every child should also clear the postmaster's inherited random-generator state in #3, prompting Thomas to introduce shared InitRandomSeeds() initialization in #4.
- When Thomas proposed committing the patch to master and PostgreSQL 11 in #5, Tom objected that second-resolution startup times lost seed entropy and recommended a shared high-resolution timestamp and broader initialization refactor in #6.
- Thomas implemented InitProcessGlobals() and MyStartTimestamp in #7, also removing the redundant Port.SessionStartTime field and updating statistics and disconnection logging to use the new global.
- The refactor landed with the exact code from #7 as 197e4af9d5; Thomas announced the master-only landing in #8, with backpatching deferred because the known consequences were harmless collisions.
- Noah Misch reopened the issue in #9, explaining that XORing PID bits directly with the fastest-changing timestamp bits reduced the number of distinct seeds available within a short interval.
- Thomas proposed byte swapping in #10, Tom questioned its mixing properties in #11, and Noah advocated restoring the old algorithm with an explicit goal of maximizing distinct seeds in #12.
- Thomas acknowledged that dropping the old bit shifts was unintended in #13, while Noah clarified that uniform seed distribution was the concern and suggested strong randomness as possible future work in #14.
- Thomas posted the corrective delta in #15; after Noah questioned why it did not reuse the exact original calculation in #16, Thomas explained in #17 that integer-only timestamps allowed direct bit shifts without the old floating-point-compatible conversion.
- Tom identified a signed-shift portability issue in #18, and Thomas added unsigned casts before committing #15 as 5b0ce3ec33 and announcing completion in #19; both submitted changes had landed, while strong-random seeding remained future work.