Re: Keeping temporary tables in shared buffers

Поиск
Список
Период
Сортировка
От Asim Praveen
Тема Re: Keeping temporary tables in shared buffers
Дата
Msg-id CANXE4TfYcHTVPkVR+aQ9o+fPyw0KBEuk36sV8qZetCLAe_4b5A@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Keeping temporary tables in shared buffers  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы Re: Keeping temporary tables in shared buffers  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Hi Amit

On Mon, May 28, 2018 at 4:25 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> This is one way, but I think there are other choices as well.  We can
> identify and flush all the dirty (local) buffers for the relation
> being accessed parallelly.  Now, once the parallel operation is
> started, we won't allow performing any write operation on them.  It

We talked about this in person in Ottawa and it was great meeting you!
 To summarize, the above proposal to continue using local buffers for
temp tables is a step forward, however, it enables only certain kinds
of queries to be parallelized for temp tables.  E.g. queries changing
a temp table in any way cannot be parallelized due to the restriction
of no writes during parallel operation.

>
> Yeah, I think cases, where we need to drop temp relations, will become
> costlier as they have to traverse all the shared buffers instead of
> just local buffers.
>

This is a valid concern.  The idea of using a radix tree of block
numbers as proposed by Andres [1] is worth pursuing.  Cost of
identifying and dropping shared buffers belonging to a relation using
radix tree would be reduced to O(log n).

Asim

[1] https://www.postgresql.org/message-id/20150912201941.GA8311%40alap3.anarazel.de


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

Предыдущее
От: Jeff Janes
Дата:
Сообщение: Re: why partition pruning doesn't work?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_config.h.win32 missing a set of flags from pg_config.h.in added in v11 development