model-writtenrun 9833 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
Feb - May 2017 · 14 entries
- Amit Langote reported that pg_dump emitted ALTER TABLE ONLY commands that failed when restoring partitioned tables, and initially proposed suppressing ONLY in selected dumpTableSchema() paths #1.
- Stephen Frost requested partitioning coverage for pg_dump's TAP tests and subsequently reported adding initial coverage, while Robert Haas questioned why the dump emitted separate NOT NULL commands at all #2 #4 #5.
- Tom Lane questioned whether the proposed workaround concealed incorrect backend semantics, and Robert clarified that partitions may have additional constraints and different physical column orders while retaining the parent's column names and types #12 #15.
- Amit replaced ONLY suppression with an approach that emitted partition attributes and their constraints inside CREATE TABLE, but Stephen demonstrated that CREATE TABLE followed by ALTER TABLE ONLY ought to work before any partitions exist #16 #17.
- Amit then split the solution into backend acceptance of ONLY on childless partitioned tables, proper inheritance processing to suppress redundant inherited constraints in pg_dump, and correction of WITH OPTIONS output #18.
- Robert initially objected after confusing ONLY with NO INHERIT, then accepted the distinction and requested documentation and consideration of TRUNCATE ONLY; Amit incorporated those changes #19 #21 #22 #23.
- Stephen took over preparation of the backend patch, restored rejection of TRUNCATE ONLY because partitioned parents store no data, improved diagnostics and hints, and requested stronger tests for non-inherited partition constraints #28.
- Amit added those tests to both pg_dump and the core regression suite while retaining the remaining pg_dump fixes; discussion refined the documentation without implementing broader ONLY support for tables that already had partitions #30 #35 #40 #42.
- Stephen's review found unnecessary partition-specific discovery functions and a failing pg_upgrade test, leading Amit to replace that machinery with getTables()/getInherits(), add a binary-upgrade correction, and make pg_get_partkeydef return NULL for unsuitable OIDs #41 #44.
- Stephen identified another binary-upgrade failure involving parents in different schemas and proposed sharing grammar productions instead of maintaining separate WITH OPTIONS behavior; Amit revised the series and acknowledged that the pg_get_partkeydef fix had landed #45 #46.
- Stephen supplied the shared-grammar implementation, making WITH OPTIONS optional for typed tables and partitions and removing its emission from pg_dump; he subsequently reported that the original backend fix and related changes had been committed #47 #49.
- Amit rebased the remaining work and merged the partition-discovery and binary-upgrade patches, but Stephen found that schema qualification targeted the wrong relation and supplied a corrected version with a binary-upgrade TAP assertion #50 #52 #53.
- Stephen fixed compatibility with older server versions in the final pg_dump revision, then declared the original open item resolved; Amit confirmed the implementation had been committed #56 #58 #59.
- The separate non-inherited constraint tests remained uncommitted, so Amit resent them; Stephen rediscovered the overlooked patch nineteen months later and rebased it with small test-ordering and comment improvements #61 #62.
Dec 2018 · 2 entries
- Stephen committed that final attachment unchanged as 2d7eeb1b14, crediting Amit, and announced the landing before Amit's closing acknowledgment; the thread ended with the outstanding tests landed #62 #63 #64.
- The later candidate 4dea33ce76 removes the earlier restriction on dropping constraints only from a partitioned parent, but its implementation originated in thread #50314; its link here documents the restriction's history.