• Tom Lane's avatar
    Tweak mdnblocks() to avoid doing lseek() on segments that it has · 973a210c
    Tom Lane authored
    previously determined not to be the last segment of a relation.
    This reduces the expected cost to one seek, rather than one seek per
    segment.  We can get away with this because truncation of a relation
    will cause a relcache flush and so the md.c file descriptor will be
    closed; when it is re-opened we will re-determine the last segment.
    973a210c
md.c 22.8 KB