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

From: Japin Li <japinli(at)hotmail(dot)com>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: BeginCopyTo - remove switching to old memory context in between COPY TO command processing
Date: 2022-01-28 11:01:20
Message-ID: MEYP282MB1669EBD009620F937DB183D2B6229@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On Fri, 28 Jan 2022 at 18:11, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-01-28 11:23:57 Re: BeginCopyTo - remove switching to old memory context in between COPY TO command processing
Previous Message Dagfinn Ilmari Mannsåker 2022-01-28 10:58:09 Server-side base backup: why superuser, not pg_write_server_files?