From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | Ranier Vilela <ranier(dot)vf(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Robert Haas <robertmhaas(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c) |
Date: | 2021-07-15 11:38:32 |
Message-ID: | CAJ7c6TPmWDDEC5HOaGCegUQU60-3ddUassEXWzEANN=riQSuDg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
>> Patch attached.
> Added to next CF (https://commitfest.postgresql.org/33/3169/)
The proposed code casts `const` variables to non-`const`. I'm surprised
MSVC misses it. Also, there were some issues with the code formatting. The
corrected patch is attached.
The patch is listed under the "Performance" topic on CF. However, I can't
verify any changes in the performance because there were no benchmarks
attached that I could reproduce. By looking at the code and the first
message in the thread, I assume this is in fact a refactoring.
Personally I don't believe that changes like:
- for (int i = 0; i < nxids; i++)
+ int i;
+ for (i = 0; i < nxids; i++)
.. or:
- for (int index = myoff; index < arrayP->numProcs; index++)
+ numProcs = arrayP->numProcs;
+ for (index = myoff; index < numProcs; index++)
... are of any value, but other changes may be. I choose to keep the patch
as-is except for the named defects and let the committer decide which
changes, if any, are worth committing.
I'm updating the status to "Ready for Committer".
--
Best regards,
Aleksander Alekseev
Attachment | Content-Type | Size |
---|---|---|
v3-0001-procarray-refactoring.patch | application/octet-stream | 26.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Josef Šimánek | 2021-07-15 11:40:31 | Re: Git revision in tarballs |
Previous Message | vignesh C | 2021-07-15 11:37:56 | Re: POC: Cleaning up orphaned files using undo logs |