| From: | Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com> |
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andreas Karlsson <andreas(at)proxel(dot)se>, Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Remove redundant assignment in CreateWorkExprContext |
| Date: | 2026-01-15 11:38:59 |
| Message-ID: | aWjR05UAyxNJq/ef@ip-10-97-1-34.eu-west-3.compute.internal |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi,
On Wed, Jan 14, 2026 at 12:03:01PM -0800, Jeff Davis wrote:
> On Wed, 2026-01-14 at 02:33 -0500, Tom Lane wrote:
> > 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?
>
> Right. Committed, thank you.
FWIW, this thread gave me the idea to check for such cases in the entire code
tree. I did it with the help of [1], and that would give:
"
85 files changed, 116 insertions(+), 116 deletions(-)
"
This is quite large, so if we think that's worth the time and energy we could
update a subset of files at a time per month.
That would:
- keep changes consistent within each file
- ease the review(s)
- avoid "large" rebases for patches waiting in the commitfest
Thoughts?
[1]: https://github.com/bdrouvot/coccinelle_on_pg/blob/main/misc/useless_assignment.cocci
Regards,
--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Shinya Kato | 2026-01-15 11:44:24 | Re: file_fdw: Support multi-line HEADER option. |
| Previous Message | Álvaro Herrera | 2026-01-15 11:26:23 | Re: Add missing JIT inline pass for llvm>=17 |