model-writtenrun 8127 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Tom Lane opened the thread with #1, showing that a walsender could misleadingly retain an old SQL query in pg_stat_activity while executing replication commands, and proposed reporting replication commands, setting debug_query_string, and cleaning up the SQL-command early exit.
- Michael Paquier opposed requiring every STATE_RUNNING report to carry a command string because background workers could use state and activity independently in #3; Tom accepted leaving that restriction out in #4, while the broader logical-worker activity cleanup raised in #1 remained unaddressed.
- Tom committed the activity-reporting patch as f560209c6e, adding scanner cleanup and removing a redundant snapshot-clear call beyond #1, and announced the landing in #4.
- After discovering that active walsenders also displayed an idle process title in #2, Tom posted a separate patch in #4 to set the title for each replication command and let PostgresMain handle the subsequent idle reset.
- Michael proposed extending SQL command-tag infrastructure in #5 and pointed out its existing replication-slot tag in #7; Tom questioned mixing replication and SQL commands in #6 and then identified duplicate CommandComplete messages in #8.
- Alvaro Herrera proposed a separate replication-completion interface in #9 and supplied #10, using a simple string-taking EndReplicationCommand() helper, placing completion calls only where needed, and removing the replication-slot entry from the SQL command-tag list.
- Tom identified repeated command-name literals when combining completion and process-title changes in #11; Alvaro proposed assigning cmdtag within each switch case in #12, and Tom accepted that design in #13, keeping completion calls local because some branches already send their own.
- Alvaro landed the completion fix as 07082b08cc with shared command strings and helper reuse, then explained in #15 that it was backpatched to PostgreSQL 13 because of the command-tag removal, while the much older duplicate-message behavior did not justify older backpatches.
- At the final message, #16, Tom acknowledged the completion fix and the process-title patch was still awaiting its commit; shortly afterward, babef40c9a landed #4 with the agreed cmdtag adaptation on the development branch only, completing all three submitted changes.