Redundant comment in ExecutePlan

Started by Rafia Sabihalmost 9 years ago2 messages
#1Rafia Sabih
rafia.sabih@enterprisedb.com
1 attachment(s)

Hello all,
I noticed there is a redundant comment in ExecutePlan,

/*
* If a tuple count was supplied, we must force the plan to run without
* parallelism, because we might exit early. Also disable parallelism
* when writing into a relation, because no database changes are allowed
* in parallel mode.
*/
if (numberTuples || dest->mydest == DestIntoRel)
use_parallel_mode = false;

/*
* If a tuple count was supplied, we must force the plan to run without
* parallelism, because we might exit early.
*/
if (use_parallel_mode)
EnterParallelMode();

I felt it is not required the second time, hence attached is the patch
to remove this second comment.
--
Regards,
Rafia Sabih
EnterpriseDB: http://www.enterprisedb.com/

Attachments:

redundant_comment.patchapplication/octet-stream; name=redundant_comment.patchDownload
diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c
index 3a5b5b2..ce6600b 100644
--- a/src/backend/executor/execMain.c
+++ b/src/backend/executor/execMain.c
@@ -1592,10 +1592,6 @@ ExecutePlan(EState *estate,
 	if (numberTuples || dest->mydest == DestIntoRel)
 		use_parallel_mode = false;
 
-	/*
-	 * If a tuple count was supplied, we must force the plan to run without
-	 * parallelism, because we might exit early.
-	 */
 	if (use_parallel_mode)
 		EnterParallelMode();
 
#2Robert Haas
robertmhaas@gmail.com
In reply to: Rafia Sabih (#1)
Re: Redundant comment in ExecutePlan

On Fri, Feb 3, 2017 at 6:07 AM, Rafia Sabih
<rafia.sabih@enterprisedb.com> wrote:

Hello all,
I noticed there is a redundant comment in ExecutePlan,

Hmm, yeah. Thanks for the patch. Committed.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers