Caching number of blocks in relation to avoi lseek.

Поиск
Список
Период
Сортировка
От Denis Perchine
Тема Caching number of blocks in relation to avoi lseek.
Дата
Msg-id 00061223344201.07937@dyp
обсуждение исходный текст
Ответы Re: Caching number of blocks in relation to avoi lseek.  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
Hello all,

While digging the code I found out quite interesting comment in
src/backend/access/heap/hio.c before function RelationPutHeapTupleAtEnd
* Eventually, we should cache the number of blocks in a relation somewhere.* Until that time, this code will have to do
anlseek to determine the number* of blocks in a relation.
 

As far as I can see there's field rd_nblocks in Relation.

Question: is this field properly updated? Could it be used instead of RelationGetNumberOfBlocks
which calls lseek.

-- 
Sincerely Yours,
Denis Perchine

----------------------------------
E-Mail: dyp@perchine.com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------


В списке pgsql-hackers по дате отправления:

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: Re: ALTER TABLE DROP COLUMN
Следующее
От: Denis Perchine
Дата:
Сообщение: Re: Patch for 'Not to stuff everything as files in a single directory, hash dirs'