model-writtenrun 8983 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Ondřej Jirman reported repeated logical-replication worker crashes after upgrading an x86_64 subscriber from PostgreSQL 11.5 to 12.1 while its ARM publisher remained on 11.5, initially associating the failures with a publisher restart #1 #3.
- Tomas Vondra investigated a bogus bytea pointer and requested debugger and Valgrind evidence; Ondřej found clean data checksums but changing crash lengths under randomized allocation, directing attention toward subscriber memory handling #5 #4 #15 #16.
- Ondřej isolated an unchanged-TOAST marker in the failing transaction, and Tomas explained that the update legitimately omitted the unchanged cover_image value before narrowing the investigation to apply_handle_update and slot_modify_cstrings #23 #24 #25.
- Tom Lane identified that slot_modify_cstrings relied on pass-by-reference values surviving ExecClearTuple and posted a patch that copied the source slot's datum and null arrays explicitly, together with a test preserving subscriber-local column values #26 #27.
- Tomas questioned whether copying a slot actually transferred ownership of its backing storage; Tom clarified that virtual-slot copying materializes an independent copy, and Tomas subsequently confirmed that the new test exposed freed-memory contents #28 #30 #31 #35.
- Ondřej applied the patch and confirmed that replication resumed without crashes and its replication slots caught up #34.
- Tom raised the absence of dropped-column coverage and committed the attached fix with comment refinements and additional publisher/subscriber dropped-column tests as 4d9ceb0018, backpatching through PostgreSQL 10 #36 #38.
- After landing the fix, Tom clarified that unchanged externally toasted values triggered Ondřej's failure even with matching schemas, explained why the pre-v12 slot handling had masked the API misuse, and identified the remaining gap in unchanged-TOAST protocol coverage #38.
- Ondřej confirmed that updating the played flag on a row containing a roughly 38 kB bytea value triggered the crash; his last message said the original databases were gone, preventing further checks for dropped columns #39 #40.
- Following the final thread message, Tom added tests for transmitting a large value and retaining it during a subsequent update as f67b173771, addressing the coverage gap identified in #38; both the fix and follow-up tests landed without another attached patch.