mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 09:22:55 +00:00
The v2 format duplicates all layer names in a set and a map. Remove the `timeline_layers` from the structure, and demote it to just being serialized from `layer_metadata` keys: this prepares for a v3 format that removes the field entirely, which can be done after this version is fully deployed. Also clean up the IndexPart's fields to disentangle it from serialization: - Remove disk_consistent_lsn from IndexPart, as it only exists as a convenience to people looking at JSON. - Replace metadata_bytes with metadata, and do the serialization of this along with the struct as a whole. The unit test that tested v1 decode with missing_layers and inconsistent layer_metadata is removed, because all production data had already been rewritten to avoid that. It was already the case that an index_part with incomplete layer_metadata would fail to attach.