Thanks, David. > I lost where. Can you show me?
See the attached warnings.txt. > But the benchmark came from: > pgbench -i -p 5432 -d postgres > pgbench -c 50 -T 300 -S -n I'm afraid this tells nothing unless you also provide the configuration files and the hardware description, and also some information on how you checked that there is no performance degradation on all the other supported platforms and possible configurations. Benchmarking is a very complicated topic - trust me, been there! It would be better to submit two separate patches, the one that addresses Size_t and another that addresses shadowing. Refactorings only, nothing else. Regarding the code formatting, please see src/tools/pgindent. -- Best regards, Aleksander Alekseev
procarray.c:780:31: warning: passing 'const pg_atomic_uint32 *' (aka 'const struct pg_atomic_uint32 *') to parameter of type 'volatile pg_atomic_uint32 *' (aka 'volatile struct pg_atomic_uint32 *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] nextidx = pg_atomic_read_u32(&procglobal->procArrayGroupFirst); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../src/include/port/atomics.h:241:47: note: passing argument to parameter 'ptr' here pg_atomic_read_u32(volatile pg_atomic_uint32 *ptr) ^ procarray.c:785:38: warning: passing 'const pg_atomic_uint32 *' (aka 'const struct pg_atomic_uint32 *') to parameter of type 'volatile pg_atomic_uint32 *' (aka 'volatile struct pg_atomic_uint32 *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] if (pg_atomic_compare_exchange_u32(&procglobal->procArrayGroupFirst, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../src/include/port/atomics.h:311:59: note: passing argument to parameter 'ptr' here pg_atomic_compare_exchange_u32(volatile pg_atomic_uint32 *ptr, ^ procarray.c:829:35: warning: passing 'const pg_atomic_uint32 *' (aka 'const struct pg_atomic_uint32 *') to parameter of type 'volatile pg_atomic_uint32 *' (aka 'volatile struct pg_atomic_uint32 *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] nextidx = pg_atomic_exchange_u32(&procglobal->procArrayGroupFirst, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../../src/include/port/atomics.h:292:51: note: passing argument to parameter 'ptr' here pg_atomic_exchange_u32(volatile pg_atomic_uint32 *ptr, uint32 newval) ^ procarray.c:3132:9: warning: returning 'const PGPROC *' (aka 'const struct PGPROC *') from a function with result type 'PGPROC *' (aka 'struct PGPROC *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] return result; ^~~~~~ procarray.c:3159:11: warning: returning 'const PGPROC *' (aka 'const struct PGPROC *') from a function with result type 'PGPROC *' (aka 'struct PGPROC *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] return proc; ^~~~ procarray.c:3778:23: warning: passing 'const List *' (aka 'const struct List *') to parameter of type 'List *' (aka 'struct List *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers] pids = lappend_int(pids, proc->pid); ^~~~ ../../../../src/include/nodes/pg_list.h:540:45: note: passing argument to parameter 'list' here extern pg_nodiscard List *lappend_int(List *list, int datum); ^ 6 warnings generated. ^Cmake[3]: *** [pg_checksums.o] Interrupt: 2 make[3]: *** wait: Interrupted system call. Stop. make[3]: *** Waiting for unfinished jobs.... make[3]: *** [pg_basebackup.o] Interrupt: 2 make[2]: *** wait: Interrupted system call. Stop. make[2]: *** Waiting for unfinished jobs.... make[2]: *** [all-pg_checksums-recurse] Interrupt: 2 make[2]: *** wait: Interrupted system call. Stop. make[1]: *** [all-bin-recurse] Error 2 make: *** [world-src-recurse] Interrupt: 2 make[3]: *** [html-stamp] Interrupt: 2 make[3]: *** [man-stamp] Interrupt: 2 make[2]: *** [all] Interrupt: 2 make[1]: *** [all] Interrupt: 2 make: *** [world-doc-recurse] Interrupt: 2 Aleksanders-MacBook-Pro:postgresql eax$ cc --version Apple clang version 11.0.0 (clang-1100.0.33.16) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin