Hello Robert, Thank you for the explanation. At first, I also thought about clamping truncation_block_length to RELSEG_SIZE. But I hesitated because I thought the reconstructed relation file couldn’t be larger than relative_limit. After reading the reconstruction code and the comments on top of the discussed block of code (many times), I finally understood that truncation_block_length is the minimum length of the reconstructed file, not just a safety limit. It determines which blocks must be fetched from older backups. So a simple clamp could change how reconstruction works if some blocks are included in incremental backups. I’ve tested the version with the limit enforced to RELSEG_SIZE, and it works correctly. Also, I’ve attached a patch based on your guidance. The changes are effectively the same as your suggested approach, but I would be happy to be listed as a contributor. Regards, Oleg Tkachenko |
0001-Clamp-truncation_block_length-to-RELSEG_SIZE.patch
Description: Binary data
|
v1-0001-Don-t-set-the-truncation_block_length-rather-than.patch
Description: Binary data
