Re: posix_fadvise v22

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: posix_fadvise v22
Дата
Msg-id 4136ffa0812110911x4914a951o6ca502879e3dede7@mail.gmail.com
обсуждение исходный текст
Ответ на Re: posix_fadvise v22  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: posix_fadvise v22  (Gregory Stark <stark@enterprisedb.com>)
Список pgsql-hackers
On Thu, Dec 11, 2008 at 4:29 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Greg Stark <greg.stark@enterprisedb.com> writes:
>>> A variable prefetch_pages is defined as "unsigned" or "int"
>>> in some places. Why don't you define it only once in a header
>>> and include the header in source files?
>
>> Just... Which header?
>
> MHO: the header that goes with the source file that is most concerned with
> implementing the variable's behavior (which is also the file that should
> have the actual variable definition).

Well the trick here is that the variable actually affects how many
PrefetchBuffer() calls *callers* should make. The callers are various
places which are doing lots of ReadBuffer calls and know what buffer's
they'll need in the future. The main places are in
nodeBitmapHeapScan.c and nbtsearch.c. Neither of those are remotely
relevant.

I think i'm settling in that it should be in the same place as the
PrefetchBuffer() prototype since anyone who needs prefetch_buffers
will need that as well (except for guc.c). So I'll put it in bufmgr.h
for now.



-- 
greg


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1268)