model-writtenrun 8033 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Peter Geoghegan identified missing activity reporting in parallel CREATE INDEX workers as an oversight in #1, then supplied a patch in #2 that propagates the leader's debug_query_string through shared memory and reports it in pg_stat_activity.
- Peter explained in #2 that index builds lack a QueryDesc or EState query string, so using the leader's text was appropriate even when an enclosing CREATE EXTENSION command appears instead of CREATE INDEX, matching serial-build behavior.
- Robert Haas committed #2 unchanged as 7de4a1bcc5 and announced it in #3; Phil Florent subsequently confirmed that his original test worked in #4.
- In October 2020, Noah Misch reopened the issue in #5 after forced-parallelism tests exposed strlen(NULL) crashes in worker_spi and logical replication, attaching a worker_spi patch that sets debug_query_string for its SQL statements.
- Noah preferred allowing NULL query strings in parallel index builds and vacuum over disabling parallelism or requiring background workers to synthesize query text in #5, and Peter supported that choice in #6; Noah left a separate parallel-operation snapshot failure for another discussion.
- Noah posted the NULL-preserving core fix alongside the unchanged worker_spi code in #7, separating crash prevention from improved statement logging in the example worker.
- Tom Lane's review in #8 identified unsafe StringInfo mutation and overly broad query-string lifetime; Noah corrected both in #9, retaining statement text through relevant fatal-error checks, and Tom accepted the revision in #10.
- The last message, #10, leaves the patches accepted but not yet committed; on October 31 Noah landed the unchanged core component of #7 as f90e80b913, backpatched through PostgreSQL 11, and the final worker_spi patch from #9 as d2246cde82, completing both fixes.