Re: Remove redundant assignment in CreateWorkExprContext - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove redundant assignment in CreateWorkExprContext
Date
Msg-id 94916.1768376000@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove redundant assignment in CreateWorkExprContext  (Andreas Karlsson <andreas@proxel.se>)
Responses Re: Remove redundant assignment in CreateWorkExprContext
List pgsql-hackers
Andreas Karlsson <andreas@proxel.se> writes:
> On 8/21/25 5:47 AM, Chao Li wrote:
>> While discussing [1], I was reading execUtils.c, then I noticed this 
>> redundant local variable assignment in CreateWorkExprContext(). The 
>> attached patch fixed that.

> Nice spotted but I think your patch reduces readability. How about this?

Looking at the git history, CreateWorkExprContext was introduced in
50a38f651, and at that time it did some nontrivial calculations
to adjust that initial value of maxBlockSize.  Later, cc721c459
simplified matters but forgot to remove the now-useless
initialization.  So +1, unless Jeff has some reason to keep it
like this?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Steven Niu
Date:
Subject: Re: [PATCH] check kernel version for io_method
Next
From: Chao Li
Date:
Subject: Re: Checkpointer write combining