Re: introduce bufmgr hooks

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: introduce bufmgr hooks
Дата
Msg-id 20220830.130220.438834321508188081.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на introduce bufmgr hooks  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: introduce bufmgr hooks  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
At Mon, 29 Aug 2022 15:24:49 -0700, Nathan Bossart <nathandbossart@gmail.com> wrote in 
> I'd like to propose some new hooks for the buffer manager.  My primary goal
> is to allow users to create an additional caching mechanism between the
...
> The attached patch is a first attempt at introducing these hooks with
> acceptable names, placements, arguments, etc.
> 
> Thoughts?

smgr is an abstract interface originally intended to allow to choose
one implementation among several (though cannot dynamically). Even
though the patch intends to replace specific (but most of all) uses of
the smgrread/write, still it sounds somewhat strange to me to add
hooks to replace smgr functions in that respect.  I'm not sure whether
we still regard smgr as just an interface, though..

As for the names, bufmgr_read_hook looks like as if it is additionally
called when the normal operation performed by smgrread completes, or
just before. (planner_hook already doesn't sounds so for me, though:p)
"bufmgr_alt_smgrread" works for me but I'm not sure it is following
the project policy.

I think that the INSTR_* section should enclose the hook call as it is
still an I/O operation in the view of the core.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



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

Предыдущее
От: Junwang Zhao
Дата:
Сообщение: [PATCH v1] [doc] polish the comments of reloptions
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: wal_sync_method=fsync_writethrough