Обсуждение: pgsql-server/src/backend/storage/smgr md.c

Поиск
Список
Период
Сортировка

pgsql-server/src/backend/storage/smgr md.c

От
tgl@postgresql.org (Tom Lane)
Дата:
CVSROOT:    /cvsroot
Module name:    pgsql-server
Changes by:    tgl@postgresql.org    03/01/06 20:19:12

Modified files:
    src/backend/storage/smgr: md.c

Log message:
    Tweak mdnblocks() to avoid doing lseek() on segments that it has
    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.