PostgreSQL on Docker部署是的shm配置注意

less than 1 minute read



"ERROR: could not resize shared memory segment "/PostgreSQL.388782411" to 50438144 bytes: No space left on device SQL state: 53100"  


Thank you Thomas,   
I make it work with extra setting --shm-size=1g in my docker run script.   
It works with 'none' and 'sysv'--I think the issue is that technically our  
environment does support 'posix', but '/dev/shm' is indeed not mounted in  
the LXC container, leading to a discrepancy between what initdb decides and  
what's actually possible. Thanks for your help.  




--ipc="MODE"  : Set the IPC mode for the container

Value	Description
””	Use daemon’s default.
“none”	Own private IPC namespace, with /dev/shm not mounted.
“private”	Own private IPC namespace.
“shareable”	Own private IPC namespace, with a possibility to share it with other containers.
“container: <_name-or-ID_>"	Join another (“shareable”) container’s IPC namespace.
“host”	Use the host system’s IPC namespace.

Size of /dev/shm. 
The format is <number><unit>. 
number must be greater than 0. 
Unit is optional and can be b (bytes), k (kilobytes), m (megabytes), or g (gigabytes). 
If you omit the unit, the system uses bytes. 
If you omit the size entirely, the system uses 64m.


Flag Counter

digoal’s 大量PostgreSQL文章入口