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

Japin Li <japinli@hotmail.com>

From: Japin Li <japinli@hotmail.com>
To: Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2022-01-28T11:01:20Z
Lists: pgsql-hackers
On Fri, 28 Jan 2022 at 18:11, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com> wrote:
> Hi,
>
> 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?
>

Thanks for the patch!  Tested and passed regression tests.  LGTM.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.



Commits

  1. Fix incorrect memory context switch in COPY TO execution

  2. Split copy.c into four files.