| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Andreas Karlsson <andreas(at)proxel(dot)se> |
| Cc: | Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org, Jeff Davis <pgsql(at)j-davis(dot)com> |
| Subject: | Re: Remove redundant assignment in CreateWorkExprContext |
| Date: | 2026-01-14 07:33:20 |
| Message-ID: | 94916.1768376000@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Andreas Karlsson <andreas(at)proxel(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-01-14 07:49:19 | Re: Checkpointer write combining |
| Previous Message | Steven Niu | 2026-01-14 07:31:09 | Re: [PATCH] check kernel version for io_method |