Re: Excessive memory usage in multi-statement queries w/ partitioning

Поиск
Список
Период
Сортировка
От Amit Langote
Тема Re: Excessive memory usage in multi-statement queries w/ partitioning
Дата
Msg-id 3ed13306-ba63-f2e8-1eeb-63b0e4f377e6@lab.ntt.co.jp
обсуждение исходный текст
Ответ на Re: Excessive memory usage in multi-statement queries w/ partitioning  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Excessive memory usage in multi-statement queries w/ partitioning  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2019/05/24 23:28, Tom Lane wrote:
> So my thought, if we want to do something about this, is not "find
> some things we can pfree at the end of planning" but "find a way
> to use a separate context for each statement in the query string".
> Maybe multi-query strings could be handled by setting up a child
> context of MessageContext (after we've done the raw parsing there
> and determined that indeed there are multiple queries), running
> parse analysis and planning in that context, and resetting that
> context after each query.

Maybe like the attached?  I'm not sure if we need to likewise be concerned
about exec_sql_string() being handed multi-query strings.

Thanks,
Amit

Вложения

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

Предыдущее
От: "Kato, Sho"
Дата:
Сообщение: RE: Why does not subquery pruning conditions inherit to parentquery?
Следующее
От: Alex
Дата:
Сообщение: some questions about fast-path-lock