Use single shared memory segment for all shared variables in Pgpool parent process
authorMuhammad Usama <m.usama@highgo.ca>
Mon, 14 Dec 2020 10:41:37 +0000 (15:41 +0500)
committerMuhammad Usama <m.usama@gmail.com>
Tue, 15 Dec 2020 07:26:28 +0000 (12:26 +0500)
commite267c7f0a373490d885863c18ba543afd648e8fa
tree9095b4aa02064fba624456ce8dafa577872a8e65
parent44d53b470744392a4504b3da9268bcc601d0bce8
Use single shared memory segment for all shared variables in Pgpool parent process

Shared memory segments is a limited resource and opening too many segments
should be avoided.
Also the default limit for on some operating systems like
OS/X (kern.sysv.shmmni: 32) is very small that you have to increase
shmmni just to run Pgpool-II. 
So to avoid creating too many shared memory segments, the commit creates a
single shared memory segment big enough to hold all required shared memory
and put all shared memory variables within that segment one after the other.
12 files changed:
src/config/pool_config.c
src/config/pool_config.l
src/include/pool.h
src/include/query_cache/pool_memqcache.h
src/include/watchdog/wd_internal_commands.h
src/include/watchdog/wd_ipc_conn.h
src/main/pgpool_main.c
src/query_cache/pool_memqcache.c
src/utils/pool_shmem.c
src/watchdog/wd_internal_commands.c
src/watchdog/wd_ipc_conn.c
src/watchdog/wd_lifecheck.c