Per bug272. From the bug report.
"This cause the creation of a lot of segments if you start and stop
pgpool continuously (and in a testing fase it could be normal). Lot of
segments bring to reach the shmem OS configuration limit and than
suddenly stops (pgpool) working."
if (shmctl(shmId, IPC_STAT, &shmStat) < 0
&& (errno == EINVAL || errno == EACCES))
return;
+#ifdef NOT_USED
else if (shmStat.shm_nattch != 0)
return;
+#endif
if (shmctl(shmId, IPC_RMID, NULL) < 0)
pool_log("shmctl(%lu, %d, 0) failed: %s",