Re: Table AM Interface Enhancements

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Table AM Interface Enhancements
Дата
Msg-id 20240410212117.mxsldz2w6htrl36v@awork3.anarazel.de
обсуждение исходный текст
Ответ на Re: Table AM Interface Enhancements  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Table AM Interface Enhancements  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
Hi,

On 2024-04-10 16:50:44 -0400, Melanie Plageman wrote:
> This brings up a question about the prefetching. We never had to have
> this discussion for sequential scan streaming read because it didn't
> (and still doesn't) do prefetching. But, if we push the streaming read
> code down into the heap AM layer, it will be doing the prefetching.
> So, do we remove the prefetching from acquire_sample_rows() and expect
> other table AMs to implement it themselves or use the streaming read
> API?

The prefetching added to acquire_sample_rows was quite narrowly tailored to
something heap-like - it pretty much required that block numbers to be 1:1
with the actual physical on-disk location for the specific AM.  So I think
it's pretty much required for this to be pushed down.

Using a read stream is a few lines for something like this, so I'm not worried
about it. I guess we could have a default implementation for block based AMs,
similar what we have around table_block_parallelscan_*, but not sure it's
worth doing that, the complexity is much lower than in the
table_block_parallelscan_ case.

Greetings,

Andres



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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Improve eviction algorithm in ReorderBuffer
Следующее
От: Nathan Bossart
Дата:
Сообщение: [MASSMAIL]allow changing autovacuum_max_workers without restarting