Re: Way to check whether a particular block is on the shared_buffer?

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Way to check whether a particular block is on the shared_buffer?
Дата
Msg-id CA+TgmoamaGjAU5fPzwwEX=zNsoadZVtOUjTxXdUr+aN5a6dEug@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Way to check whether a particular block is on the shared_buffer?  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Ответы Re: Way to check whether a particular block is on the shared_buffer?  (Kouhei Kaigai <kaigai@ak.jp.nec.com>)
Список pgsql-hackers
On Tue, Feb 9, 2016 at 6:35 PM, Kouhei Kaigai <kaigai@ak.jp.nec.com> wrote:
> Unfortunately, it was not sufficient.
>
> Due to the assumption, the buffer page to be suspended does not exist
> when a backend process issues a series P2P DMA command. (If block would
> be already loaded to the shared buffer, it don't need to issue P2P DMA,
> but just use usual memory<->device DMA because RAM is much faster than
> SSD.)
> It knows the pair of (rel,fork,block), but no BufferDesc of this block
> exists. Thus, it cannot acquire locks in BufferDesc structure.
>
> Even if the block does not exist at this point, concurrent process may
> load the same page. BufferDesc of this page shall be assigned at this
> point, however, here is no chance to lock something in BufferDesc for
> the process which issues P2P DMA command.
>
> It is the reason why I assume the suspend/resume mechanism shall take
> a pair of (rel,fork,block) as identifier of the target block.

I see the problem, but I'm not terribly keen on putting in the hooks
that it would take to let you solve it without hacking core.  It
sounds like an awfully invasive thing for a pretty niche requirement.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: proposal: PL/Pythonu - function ereport
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Improve docs wrt catalog object ACLs