model-writtenrun 2788 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Erik Nordström reported that merging TimescaleDB partitions through repeated heap rewrites preserved only the last partition's data on PostgreSQL 17, although the approach worked on PostgreSQL 15 and 16 #1.
- Matthias van de Meent traced the loss to the bulk writer assuming an initially empty relation, and Erik confirmed that gap filling zeroed existing pages; they considered an API option for existing forks or skipping zero initialization #2 #3.
- Matthias supplied a patch that instead initializes relsize from the existing fork size and uses it for extension decisions, while separately counting pages written; he also explained that the destructive zero filling was not WAL-logged #4.
- Heikki Linnakangas approved the approach and requested confirmation, after which Erik verified that the patch fixed the issue and suggested simplifying a relsize update #5 #6.
- Heikki committed the patch with light edits as ee937f0409 and backpatched it to PostgreSQL 17, adopting Erik's increment suggestion without the assertion and removing the unused pages_written counter #7.
- Erik accepted the committed changes and thanked the participants, leaving the reported issue resolved with no further work raised in the thread #8.