model-writtenrun 6920 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Oct 2021 - Jan 2022 · 8 entries
- Mark Dilger opened the thread with three patches to constrain non-superuser subscription owners, permit explicit ownership transfers, and enforce subscriber-table permissions, splitting this work from a broader delegation proposal #1.
- Andrew Dunstan questioned delayed recognition of ownership changes, and Mark supplied a standalone reproducer showing that disabling and reenabling a subscription does not synchronously stop its workers #3 #4.
- Mark added owner-change detection and worker restart, while Amit Kapila clarified that the new owner takes effect at transaction boundaries rather than after each replicated record #7 #25 #27.
- Jeff Davis challenged ownership that withheld normal owner powers, while alternative GRANT-based delegation and separate RUNAS syntax remained unsettled; Mark consequently isolated permission enforcement and deferred the first two patches rather than landing them #13 #19 #32 #33 #36.
- Jeff found missing RLS and partition checks, and Mark explained that COPY FROM lacked the infrastructure to honor RLS policies consistently with ordinary apply operations #37 #40.
- Robert Haas argued against changing execution identity midway through a transaction or locking the subscription for every replicated transaction, and Andrew endorsed transaction-boundary recognition of ownership changes #59 #64 #65.
- Mark's final permission patch rejected replication wherever RLS applied to the subscription owner, retained the usual bypass exceptions, corrected partition-target checks, and expanded tests; Jeff committed it unchanged as a2ab9c06ea #67 #70.
- Amit identified missing SELECT checks during UPDATE and DELETE lookups, and Tom Lane explained the information-leak risk and reported excessive test runtime; Jeff addressed those issues in the discussion-derived cleanup 96a6f11c06, which also incorporated an initial-sync fix from thread #226163 and corrected a documentation typo #68 #73 #74 #75.
Jan - Feb 2023 · 7 entries
- After roughly a year, Robert revived non-superuser subscription creation, while Mark clarified that the earlier work protected subscriptions after owner demotion but had deliberately stopped short of enabling their creation by non-superusers #77 #78.
- Robert's new series introduced a predefined creation role, restricted connection parameters that accessed local files, and allowed subscription owners to use ALTER SUBSCRIPTION SKIP #90.
- Andres Freund and Jacob Champion identified loopback and ambient-authentication attacks that connection-string file checks would not prevent, causing Robert to reconsider the security model #91 #99 #108.
- Jeff proposed separate connection objects and connection-creation privileges, but accepted that the broader design could follow the immediate subscription feature #114 #115 #116.
- Robert replaced file-access checks with the postgres_fdw-style requirement that non-superusers supply a password and the remote server use it, adding a superuser-controlled password_required=false exception #118.
- Andres's detailed reviews led to database CREATE checks, SET ROLE requirements for ownership transfers, consistent restrictions on password-exempt subscriptions, connection cleanup, and regression tests #120 #131 #141 #149.
- Mark and Andres highlighted how replicated triggers and other table expressions could compromise the subscription owner, prompting Robert to pursue execution as the table owner in a separate effort #125 #136 #144 #146.
Mar - Jun 2023 · 6 entries
- Robert added documentation and pg_dump support to the final attached feature patch, explicitly keeping the separate table-owner execution work outside this series #187.
- Jeff preferred separating connection privileges and landing table-owner execution first, while Andres supported the immediate reduction in superuser exposure; Robert proceeded with the subscription feature to avoid further conflicts, committing #187 with documentation adjustments and a catalog-version bump as c3afe8cf5a #188 #197 #201 #203.
- Hou Zhijie reported a buildfarm crash caused by superuser_arg accessing catalogs outside a transaction and supplied an inline fix; Alexander Lakhin produced a reproducer, and Robert committed the fix with an explanatory comment as e7e7da2f8d #205 #208 #210.
- Amit noticed that changing password_required should restart the apply worker; Robert requested removing an unnecessary superuser exception, and the revised attachment landed unchanged as c1cc4e688b #211 #213 #214 #215 #220.
- Amit also noticed that psql omitted the new option, and Vignesh C supplied display support and regression coverage that Amit and Robert approved before it landed unchanged as 19e65dff38 #220 #222 #223 #224.
- Hou found the analogous transaction-boundary crash in the tablesync worker; Amit recommended reusing an existing transaction, and Hou's revised patch landed unchanged as b5c517379a #226 #229 #230 #232.
Aug - Sep 2023 · 1 entry
- The discussion subsequently broadened into sandboxing untrusted code, with Robert proposing trust tracking and different restrictions on external access and persistent session changes, while Jeff pressed for consistent, testable execution-context rules #233 #234 #236 #238.
Apr - Jun 2026 · 3 entries
- In April 2026, Robert explained why immediate-provider trust checks and runtime-stack restrictions could fail through trusted intermediaries, inlining and deferred execution; Tom Lane and Andres encouraged practical partial defenses, while Jeff continued advocating context-based restrictions #239 #240 #241 #244.
- Robert then proposed provenance chains carried through rewriting, planning and execution to explain why code was being invoked, but described the implementation and enforcement policies as unfinished work without an attached patch #245 #246.
- By the final exchange, the subscription feature and reported fixes had landed, while provenance enforcement, trusted infrastructure boundaries and function classifications remained open; Jacob supported further exploration, and Tom cautioned that making the policies usable could require years of refinement #247 #248 #249.