From: | Japin Li <japinli(at)hotmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Remove redundant MemoryContextSwith in BeginCopyFrom |
Date: | 2022-01-19 14:20:58 |
Message-ID: | MEYP282MB16693DDABDFEC7949AC31857B6599@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 | Content-Type | Size |
---|---|---|
Remove-redundant-MemoryContextSwith-in-BeginCopyFrom.patch | text/x-patch | 520 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Nikita Malakhov | 2022-01-19 14:25:19 | Re: Pluggable toaster |
Previous Message | Daniel Gustafsson | 2022-01-19 13:54:14 | Re: New developer papercut - Makefile references INSTALL |