On Wed, Dec 4, 2024 at 10:13 PM Michael Paquier <mich...@paquier.xyz> wrote: > > totalpages is signed, and BlockNumber is unsigned. Hence in theory > you could always fall into a trap once totalpages gets higher than > (2^31 - 1), no? This is not going to be a problem in practice even if > the number of pages per range assigned to brin can be 1, still..
Good point -- so the fix should be something like: (a) make totalpages a BlockNumber or uint32; (b) cast either "totalpages" or "10" to int64, before returning the result? James