Re: Streaming read-ready sequential scan code

Поиск
Список
Период
Сортировка
От Melanie Plageman
Тема Re: Streaming read-ready sequential scan code
Дата
Msg-id CAAKRu_bhaY7rxhfhCDo0D0wPaM24ugT1yPtiJ92sceTegNB4ww@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Streaming read-ready sequential scan code  (Melanie Plageman <melanieplageman@gmail.com>)
Ответы Re: Streaming read-ready sequential scan code  (Melanie Plageman <melanieplageman@gmail.com>)
Список pgsql-hackers
On Mon, Feb 19, 2024 at 6:05 PM Melanie Plageman
<melanieplageman@gmail.com> wrote:
>
> On Mon, Jan 29, 2024 at 4:17 PM Melanie Plageman
> <melanieplageman@gmail.com> wrote:
> >
> > There is an outstanding question about where to allocate the
> > PgStreamingRead object for sequential scans
>
> I've written three alternative implementations of the actual streaming
> read user for sequential scan which handle the question of where to
> allocate the streaming read object and how to handle changing scan
> direction in different ways.
>
> Option A) https://github.com/melanieplageman/postgres/tree/seqscan_pgsr_initscan_allocation
> - Allocates the streaming read object in initscan(). Since we do not
> know the scan direction at this time, if the scan ends up not being a
> forwards scan, the streaming read object must later be freed -- so
> this will sometimes allocate a streaming read object it never uses.
> - Only supports ForwardScanDirection and once the scan direction
> changes, streaming is never supported again -- even if we return to
> ForwardScanDirection
> - Must maintain a "fallback" codepath that does not use the streaming read API

Attached is a version of this patch which implements a "reset"
function for the streaming read API which should be cheaper than the
full pg_streaming_read_free() on rescan. This can easily be ported to
work on any of my proposed implementations (A/B/C). I implemented it
on A as an example.

- Melanie

Вложения

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

Предыдущее
От: stepan rutz
Дата:
Сообщение: Re: Detoasting optionally to make Explain-Analyze less misleading
Следующее
От: Andrew Atkinson
Дата:
Сообщение: Re: Add publisher and subscriber to glossary documentation.