Remove redundant MemoryContextSwith in BeginCopyFrom - Mailing list pgsql-hackers

From Japin Li
Subject Remove redundant MemoryContextSwith in BeginCopyFrom
Date
Msg-id MEYP282MB16693DDABDFEC7949AC31857B6599@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Whole thread Raw
Responses Re: Remove redundant MemoryContextSwith in BeginCopyFrom
Re: Remove redundant MemoryContextSwith in BeginCopyFrom
List pgsql-hackers
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, it switches to the oldcontext and immediately switches back to
COPY memory context, IMO, this is redundant, and can be removed safely.

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


Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: New developer papercut - Makefile references INSTALL
Next
From: Nikita Malakhov
Date:
Subject: Re: Pluggable toaster