model-writtenrun 2415 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Thomas Munro proposed CREATE DATABASE STRATEGY=FILE_CLONE to make large template copies fast and space-efficient through filesystem cloning, while retaining FILE_COPY's checkpoints and backup/PITR limitations #1.
- After identifying cancellation responsiveness as a concern, Thomas added interrupt checks and 1 MB copying chunks, reporting substantial speedups on Linux Btrfs and XFS without a measurable penalty from chunking #2 #4.
- Andrew Dunstan raised Btrfs direct-I/O problems, Andres Freund suggested using cloning during initdb and sharing existing pg_upgrade support, and Robert Haas cautioned against broader adoption while filesystem bugs remained; automatic initdb cloning did not enter the submitted implementation #3 #5 #7.
- Returning in March 2024, Thomas rebased the patch and identified redo behavior as the remaining design problem, weighing fallback copying against breaking recovery on unsupported replicas, then added documentation and a wait event #9 #10.
- Following an off-list discussion with Thomas, Nazir Bilal Yavuz took over revisions and replaced the SQL strategy with createdb_file_copy_method; Robert supported the configuration approach because redo could choose a different copying method from the original operation #11 #19.
- Ranier Vilela recommended opening destination files write-only and also suggested truncation; Nazir explained why existing destinations must be rejected, and Ranier accepted omitting O_TRUNC #12 #17 #18.
- Robert proposed the broader name file_copy_method and placing selection in common copying code; Nazir implemented selection in copydir(), extending it to database moves and redo, incorporated O_WRONLY, and raised the difficulty of portable tests requiring specific filesystems #21 #22.
- Further review clarified the documented list of affected commands and removed the startup-only restriction, producing a user-settable configuration parameter with revised comments and documentation #23 #24 #25 #26.
- Ranier questioned whether the chosen APIs justified the cloning terminology, while Nazir defended their cloning capability and considered FICLONE's availability; the submitted implementation retained copy_file_range() and copyfile() #27 #28.
- Nazir refreshed the patch in August 2024, relocating its option table into guc_tables.c, and rebased it again in March 2025 without further content changes #29 #30.
- Thomas committed the final submission as f78ca6f3eb, adding the missing macOS header and editing documentation to describe system calls rather than an incomplete filesystem list; his final message confirms the feature landed, with no remaining patch announced #30 #31.