public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Bharath Rupireddy <[email protected]>
Cc: Japin Li <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Remove redundant MemoryContextSwith in BeginCopyFrom
Date: Wed, 19 Jan 2022 11:38:44 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <CALj2ACWEjn2p=8RbFg1uKY-SXTHaxXn3bWZ=dK5qPr_r3F=O3Q@mail.gmail.com>
References: <MEYP282MB16693DDABDFEC7949AC31857B6599@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM>
<CALj2ACWEjn2p=8RbFg1uKY-SXTHaxXn3bWZ=dK5qPr_r3F=O3Q@mail.gmail.com>
Bharath Rupireddy <[email protected]> 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 memory
> contexts in between.
Hmm, I think it'd be a better idea to remove the one in the middle of
BeginCopyTo. The code after that is still doing setup of the cstate,
so the early switch back looks to me like trouble waiting to happen.
regards, tom lane
view thread (4+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Remove redundant MemoryContextSwith in BeginCopyFrom
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox