mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 22:12:56 +00:00
usize/isize type corresponds to the CPU architecture's pointer width, i.e. 64 bits on a 64-bit platform and 32 bits on a 32-bit platform. The logical size of a database has nothing to do with the that, so u64/i64 is more appropriate. It doesn't make any difference in practice as long as you're on a 64-bit platform, and it's hard to imagine anyone wanting to run the pageserver on a 32-bit platform, but let's be tidy. Also add a comment on why we use signed i64 for the logical size variable, even though size should never be negative. I'm not sure the reasons are very good, but at least this documents them, and hints at some possible better solutions.