Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)

Поиск
Список
Период
Сортировка
От Aleksander Alekseev
Тема Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Дата
Msg-id CAJ7c6TPmWDDEC5HOaGCegUQU60-3ddUassEXWzEANN=riQSuDg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Ответы Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Список 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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: vignesh C
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs
Следующее
От: Josef Šimánek
Дата:
Сообщение: Re: Git revision in tarballs