Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> It's interesting that the smgr gets this wrong then (as also evidenced
> by the fact that relation_size does as well). Could you please do a ls
> -l path/to/relfilenode*?
IIRC, smgrnblocks will stop as soon as it finds a segment that is not
1GB in size. Could you check the lengths of all segments for that
relation?
regards, tom lane