On Thu, 20 Jan 2022 at 08:50, Tom Lane wrote:
> Japin Li writes:
>> I see you have already push this patch on master (89f059bdf52), why not
>> remove MemoryContextSwitchTo in the middle of BeginCopyTo in this commit?
>
> That was a different suggestion from a different person, so I didn't
> wan
Japin Li writes:
> I see you have already push this patch on master (89f059bdf52), why not
> remove MemoryContextSwitchTo in the middle of BeginCopyTo in this commit?
That was a different suggestion from a different person, so I didn't
want to muddle the credit. Also, it requires a bit of testin
On Thu, 20 Jan 2022 at 00:38, Tom Lane wrote:
> Bharath Rupireddy writes:
>> +1. It looks like a thinko from c532d15d. There's no code in between,
>> so switching to oldcontext doesn't make sense.
>
> Agreed.
>
>> I think we also need to remove MemoryContextSwitchTo(oldcontext); at
>> the end o
Bharath Rupireddy writes:
> +1. It looks like a thinko from c532d15d. There's no code in between,
> so switching to oldcontext doesn't make sense.
Agreed.
> I think we also need to remove MemoryContextSwitchTo(oldcontext); at
> the end of BeginCopyTo in copyto.c, because we are not changing memo
On Wed, Jan 19, 2022 at 7:51 PM Japin Li wrote:
>
>
> Hi, hackers
>
> When I read the code of COPY ... FROM ..., I find there is a redundant
> MemoryContextSwith() in BeginCopyFrom(). In BeginCopyFrom, it creates
> a COPY memory context and then switches to it, in the middle of this
> function, i
On Wed, Jan 19, 2022 at 11:21 AM Japin Li wrote:
>
>
> Hi, hackers
>
> When I read the code of COPY ... FROM ..., I find there is a redundant
> MemoryContextSwith() in BeginCopyFrom(). In BeginCopyFrom, it creates
> a COPY memory context and then switches to it, in the middle of this
> function,