model-writtenrun 7072 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Nov 2023 · 3 entries
- Tomas Vondra opened the investigation with a randomized reproduction of missing subscriber rows, diagnostic patches, a slow forced-cache-refresh experiment, and a stronger publication-lock alternative #1.
- Andres Freund reproduced the failure without initial table synchronization and explained that decoding an older transaction rebuilds stale catalog caches after the publication change has already been decoded; he proposed either stronger locking or distributing invalidations to concurrent transactions #3 #10.
- Tomas Vondra and Andres Freund debated whether ShareRowExclusiveLock was sufficient beyond the demonstrated case, while recognizing the broader cache-coherency concerns #5 #6 #8.
Jan 2024 · 1 entry
- Vadim Lakt reported the same symptom on a production server and said the original patch fixed it, but development remained quiet until Amit Kapila resumed the investigation and Tomas handed it over in June 2024 #11 #12 #15 #16.
Jun - Oct 2024 · 11 entries
- Vignesh C turned the stronger-lock experiment into a tested patch for supported branches, and Amit Kapila expanded it to inheritance children before Vignesh added corresponding coverage #17 #20 #21.
- Nitin Motiani showed that schema publications bypassed the modified locking path and supplied a schema-locking supplement; Vignesh then extended the fix to publication removal cases #23 #25.
- Review by Nitin Motiani and Amit Kapila moved removal locks beside existing invalidation calls and reduced test overhead, producing the consolidated locking patch and Amit's comment-only supplement #26 #27 #28 #29 #30.
- Testing DROP PUBLICATION exposed the need to lock every table for an all-tables publication, which Vignesh and Amit considered impractical; Masahiko Sawada supported trying invalidation distribution because it could also solve another decoding problem #31 #36 #37 #38.
- Shlok Kyal replaced publication locking with invalidation distribution alongside historic snapshots, then simplified the implementation to use invalidations already stored on each transaction #40 #41.
- Vignesh C and Nitin Motiani questioned partially replicating transactions across concurrent publication changes, but accepted Amit Kapila's explanation that equivalent filtering already occurs with publication changes inside a transaction or selective publication actions #42 #44 #47 #48 #52.
- Zhijie Hou tested table and schema changes, streaming, and subtransactions successfully, supplying isolation tests that later provided a cheaper testing direction #51.
- Shlok Kyal's decoding benchmarks exposed substantial overhead under repeated publication changes, leading him to add a second patch for selective cache invalidation #49 #53 #54.
- Hayato Kuroda objected to introducing general namespace invalidation infrastructure for that optimization, so Shlok removed it and retained a smaller pgoutput callback change #55 #56.
- Hayato then found that the reduced optimization missed publication renames and raised ownership-change concerns; Shlok responded with publication-specific invalidation infrastructure #58 #59 #60.
- Hayato supplied a simpler alternative using direct relation invalidation for publication rename and ownership changes, which Shlok incorporated before refining partition coverage and folding in Hayato's formatting corrections #62 #63 #64 #65 #66.
Dec 2024 · 1 entry
- After a two-month pause and a rebase, Masahiko Sawada confirmed the fix but asked whether transactions without base snapshots needed invalidations and requested broader performance measurements #71 #72.
Feb - Apr 2025 · 11 entries
- Following another rebase, Zhijie Hou and Masahiko concluded that transactions without base snapshots cannot have earlier queued changes requiring these invalidations, and Amit incorporated that reasoning into the patch comments #74 #79 #80 #82.
- Benoit Lobréau independently measured performance regressions, while Amit requested that the selective-invalidation optimization be pursued separately because it was useful independently of the data-loss fix #83 #84 #86.
- Hayato Kuroda took over rebasing and branch preparation, and reported detailed team benchmarks showing the largest regressions when frequent publication changes repeatedly invalidate actively decoded tables; the separate optimization was already available on the development branch #87 #88 #89.
- Amit accepted the remaining correctness-related overhead and advised against backporting the independent performance changes solely for these uncommon workloads #90.
- Amit's final review requested a narrow invalidation accessor instead of exposing ReorderBufferTXNByXid(), plus a single isolation regression test; Hayato implemented those changes with Hou's help and prepared the final commit explanation #92 #93 #95.
- PostgreSQL 13 required separate treatment because it lacked invalidation change records, so Hayato offered a limited fix and an additional, more invasive patch that would execute invalidations during decoding #94.
- Amit initially favored the limited PostgreSQL 13 option, then landed the main fix through PostgreSQL 14 while leaving that older branch under discussion #96 #97 #98.
- The supplied main-fix candidate 0434033e8b comes from Hayato's final submission #95, preserving Shlok's invalidation-distribution implementation with light commit-message, test, and branch adaptations; the related ALTER TYPE investigation in thread #48261 supplied an earlier reproducer and design proposal, while this thread supplied the matching implementation.
- Masahiko argued that the limited PostgreSQL 13 fix still substantially reduced silent data loss without introducing a new change-record format, and Amit subsequently applied that limited backport while leaving the invasive second patch out #100 #101 #102 #103.
- Shlok spotted misspelled isolation-test filenames across the affected branches and supplied correction patches; 4164d69763 implements that correction from #104.
- The thread ends with Amit confirming the filename correction was pushed, leaving the main fix and cleanup landed, PostgreSQL 13 intentionally limited, and the selective-invalidation optimization handled separately #105 #103 #88.