model-writtenrun 6917 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - May 2022 · 8 entries
- Zheng Li proposed logical replication of DDL to reduce upgrade downtime, initially logging original SQL for subscriber execution and distinguishing database-wide from table-level replication #1; Aleksander Alekseev advocated a limited first implementation, while Zheng emphasized nearly identical databases as the initial upgrade use case #2 #4.
- Alvaro Herrera pointed to his earlier structured JSON deparser as a way to reconstruct commands independently of runtime conditions #9, while Japin Li's testing and request for smaller patches led Zheng to submit publication controls, DDL messaging, and subscriber execution as a three-part series #11 #13.
- Alvaro argued that structured commands enable schema remapping, an advantage Robert Haas endorsed #33 #34; meanwhile Zheng expanded original-SQL replay to materialized views and CREATE TABLE AS, separating table creation from replicated data #47.
- Initial schema synchronization remained a separate unresolved prerequisite: Amit Kapila and Dilip Kumar questioned consistency during setup, and Euler Taveira proposed developing schema initialization separately #35 #37 #41.
- Zheng enabled DDL inside functions and procedures and fixed duplicate subcommand logging #51, then temporarily rejected volatile table rewrites after Euler explained their consistency risks #49 #52.
- Amit, Ajin Cherian, and Zhijie Hou introduced an alternative implementation using event triggers, catalog-derived JSON, WAL transport, and subscriber reconstruction, retaining portions of Zheng's messaging infrastructure #54.
- Alvaro identified comprehensive deparser testing as a maintenance requirement and suggested replaying the ordinary regression suite and comparing dumps #60; Masahiko Sawada subsequently supplied an initial test harness #96.
- Ajin added DROP TABLE processing that records publication membership before deletion #76, and Hou added ALTER TABLE replication that converts rewrite INSERT records into UPDATEs while allowing subscriber-only rows to be rewritten locally #80.
Jun - Oct 2022 · 8 entries
- Hou implemented CREATE TABLE AS by logging table creation before population and replicating the resulting rows separately #83; review refined the new event into table_init_write and consolidated trigger setup #85.
- Zheng experimented with transmitting serialized internal parse trees #88, but Hou and Masahiko objected to their cross-version instability #89 #96; Zheng's next original-SQL series dropped that experiment and adopted rewrite-to-UPDATE handling #93.
- The JSON branch gained sequence and schema commands, volatility restrictions, partitioning, generated and identity columns, access methods, and indexes, while temporary-table DDL was excluded from WAL logging #95 #110.
- Review by Amit, Vignesh, and Peter Smith drove helper cleanup and an option to omit absent syntax clauses from JSON and WAL #117 #119.
- Zheng explored original-SQL replication for global objects such as roles, databases, and tablespaces #121, but the work moved to a separate discussion because global objects do not fit naturally into database-local publications #130 #131.
- Hou, Ajin, Vignesh, and Zheng expanded deparsing through routines, triggers, operators, domains, types, conversions, policies, extensions, privileges, text search, rules, foreign objects, views, and statistics #120 #133 #137 #140 #155; extension-internal commands were suppressed to avoid duplicate execution #137.
- Transform support exposed an existing object-identity string containing an unwanted ON keyword #142; after Alvaro endorsed fixing the identity itself, Zheng changed getObjectIdentityParts and its expected output instead of compensating inside the deparser #143 #144.
- Further command coverage included languages, comments, default privileges, access methods, and routines #156 #157 #158, while Peter requested staged scope and clearer documentation and Alvaro requested a separate helper-infrastructure patch #159 #163.
Nov 2022 - Jan 2023 · 7 entries
- Testing exposed duplicate internally generated commands, prompting Zheng to suppress non-top-level DDL and then repair lost foreign keys #187 #188; li jie demonstrated that this also broke SERIAL and CREATE SCHEMA, leading to targeted TableLikeClause suppression instead #199 #200.
- Vignesh preserved ALTER TYPE USING expressions before destructive subcommands and copied materialized-view query trees before optimization could invalidate them #202 #203.
- Zheng integrated Runqi Tian's test module to check JSON, reconstructed SQL, dump equivalence, and eventually regression-suite replay #209, then added security labels, domain constraints, and foreign-table commands #216 #218 #223.
- Alvaro requested distinct infrastructure, deparser, WAL-messaging, and replication components #204; Vignesh implemented that restructuring and made earlier components independently testable #225 #227.
- Zheng introduced documented ddl='table' and ddl='all' publication options and separated table deparsing from other commands to support staged review and delivery #234.
- Amit questioned foreign-server replication semantics and the safety of manual initial schema synchronization #244; Zheng emphasized online upgrades but acknowledged the setup complexity #245.
- The developers fixed duplicate internal triggers during dump/restore #242 and duplicate DDL WAL messages when multiple publications registered equivalent trigger functions #248.
Feb - Mar 2023 · 9 entries
- Alvaro judged the full feature too large for PostgreSQL 16 and advocated extracting independent fixes #247; the transform identity correction from #259, originally written by Zheng, landed unchanged as the two-hunk subset 9a31256231, with no backpatch because it changes observable identity text #266.
- Subscription-command replication was deferred because chained subscriptions could duplicate or lose data #261 #262.
- Zheng added optional preservation of the publisher's object owner #276, while Jonathan S. Katz's application tests exposed search-path failures in replicated function bodies #280; disabling function-body checks did not resolve runtime expression failures demonstrated by Amit #284 #288.
- Jonathan's SQL-standard function tests also exposed incorrect DML target aliases #286, and Vignesh reproduced the bug in pg_dump and moved it to a separate thread #289; Tom Lane's patch #528351 in thread #47469 landed unchanged as 393430f575, so the implementation is attributed to that thread while this thread supplied the report and initial analysis.
- After Masahiko argued that replicated objects should normally preserve ownership #294, Zheng enabled ownership matching by default and limited owner metadata to creation commands #297.
- Hou simplified publication deparsing to reuse existing collected parse trees and object addresses instead of another command representation #300.
- Runqi added broad table and constraint tests that exposed roughly twenty failures #309; Zheng repaired command ordering, sequence types, absent JSON clauses, IF EXISTS, and CASCADE, while identifying remaining partition and index cases #310.
- Wang Wei's review found missing OR REPLACE, IF NOT EXISTS, and index syntax details #312, leading to further fixes and ONLY handling through #316.
- Tom Lane objected to the enormous patch, unresolved semantics and security, and maintenance burden, asking for a much smaller initial feature #320; Hou consequently split table, index, ownership, and other-DDL components and temporarily removed the unsplit test module #331.
Apr - Jul 2023 · 6 entries
- The next revisions added schema-publication and index filtering #341, then rejected nonimmutable table rewrites because rewrite-to-UPDATE handling cannot safely accommodate changed replica identity; internal-trigger catalog marking and a narrower object scope accompanied that change #357.
- Amit proposed eliminating the intermediate ObjTree representation #380, and Shveta Malik and Vignesh progressively converted table-related commands directly into JSONB while addressing review and test failures #387 #392 #408.
- Masahiko questioned CTAS semantics and reported another trigger failure #411, while Amit requested an initial CREATE/ALTER/DROP TABLE scope #413; Shveta consolidated direct JSONB generation and removed CTAS, SELECT INTO, verbose mode, and the old deparser test module #420.
- Michael Paquier raised the ongoing maintenance cost and suggested generating deparser code from node annotations #417; Jelte Fennema-Nio separately shared Citus-derived table-definition generation code as another source of ideas #423.
- Vignesh and Hou prototyped annotation-driven generation but found that catalog access and output ordering still required custom handling #428; the main handwritten series continued separately with serial-sequence and helper fixes #429.
- Hou introduced regression testing that substituted commands deparsed through a remote database #432; after Amit and Masahiko favored avoiding remote-session complications, Hou replaced it with two regression passes, although failures and missing Meson support remained #433 #434 #436.
Mar 2024 · 1 entry
- Development then became inactive, and in March 2024 Amit recommended returning the entry with feedback or withdrawing it because substantial work remained #438.
Feb 2026 · 1 entry
- Vitaly Davydov revived discussion in February 2026 by proposing reconstruction from catalog WAL changes #440; subsequent discussion examined stable representations, command boundaries, and the difficulty of recovering ALTER expressions #443 #444.
Apr - Jun 2026 · 3 entries
- Masahiko resumed the effort for PostgreSQL 20 with a proposal for native DDLCommand WAL records independent of publication event triggers, historical-snapshot reconstruction, and operation-based publication filtering, but supplied no new indexed patch #450.
- The renewed discussion established that catalog reconstruction still needs parse-tree information for some ALTER commands and raised slot lifecycle, concurrency, standby, and failover problems with automatically installed event triggers #460 #466.
- At the final message, Masahiko questioned expanding one user command into several commands because it complicates filtering and audit use, advocated preserving original command intent and sharing capture infrastructure between event triggers and WAL, and was preparing another patch #467; the transform identity fix had landed from this series and the alias fix through thread #47469, while DDL replication itself remained unresolved.