Re: Shared access methods?

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Shared access methods?
Дата
Msg-id 20180614203844.7ysqxbonum66jm6a@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Shared access methods?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Hi,

On 2018-06-14 16:33:08 -0400, Alvaro Herrera wrote:
> On 2018-Jun-14, Andres Freund wrote:
> 
> > But I do think there's a few things that are doable without actually
> > needing to invoke any user defined code aside of the AM code
> > itself. E.g. heap pruning / aggressively setting hint bits doesn't need
> > to invoke operators, and I can think of some ways to implement index
> > delete marking that does so without invoking any comparators either.
> 
> So what you want to do is have bgwriter/checkpointer able to scan some
> catalog and grab a function pointer that can "execute pruning on this
> shared buffer", right?

Yes.

> For that maybe we need to split out a part of
> AMs that is storage-level and another one that is data-level.  So an
> access method would create two catalog entries, one of which is shared
> (pg_shared_am? ugh) and the other is the regular one we already have in
> pg_am.  The handler function in pg_shared_am gives you functions that
> can only do storage-level stuff such as hint bit setting, page pruning,
> tuple freezing, CRC, etc which does not require access to the data
> itself.

I'm not sure I understand the need for this split?  Why can't we have
pg_am's amhandler - now a shlib/name combo - return its normal
*AmRoutine struct, one of which would be an optional 'amonwriteout'
callback?

Greetings,

Andres Freund


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Shared access methods?
Следующее
От: Robert Haas
Дата:
Сообщение: Re: BUG #15237: I got "ERROR: source for a multiple-column UPDATEitem must be a sub-SELECT or ROW() expression"