Re: BeginCopyTo - remove switching to old memory context in between COPY TO command processing

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BeginCopyTo - remove switching to old memory context in between COPY TO command processing
Дата
Msg-id YfPSTZy4HnrMrYBm@paquier.xyz
обсуждение исходный текст
Ответ на BeginCopyTo - remove switching to old memory context in between COPY TO command processing  (Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>)
Список pgsql-hackers
On Fri, Jan 28, 2022 at 03:41:11PM +0530, Bharath Rupireddy wrote:
> While reviewing patch at [1], it has been found that the memory
> context switch to oldcontext from cstate->copycontext in between
> BeginCopyTo is not correct because the intention of the copycontext is
> to use it through the copy command processing. It looks like a thinko
> from the commit c532d1 [2]. Attaching a small patch to remove this.
>
> Thoughts?

I think that you are right.  Before c532d15d, BeginCopy() was
internally doing one switch with copycontext and the current memory
context.  This commit has just moved the internals of BeginCopy()
into BeginCopyTo(), so this looks like a copy-paste error to me.  I'll
go fix it, thanks for the report!
-
Michael

Вложения

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

Предыдущее
От: Japin Li
Дата:
Сообщение: Re: BeginCopyTo - remove switching to old memory context in between COPY TO command processing
Следующее
От: Fabrice Chapuis
Дата:
Сообщение: Re: Logical replication timeout problem