浏览代码

Merge pull request #1331 from wglambert/master

Notes on --shm-size for Postgres
Tianon Gravi 7 年之前
父节点
当前提交
49d9a606d4
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      postgres/content.md

+ 2 - 0
postgres/content.md

@@ -198,3 +198,5 @@ When using the Alpine variants, any postgres extension not listed in [postgres-c
 # Caveats
 
 If there is no database when `postgres` starts in a container, then `postgres` will create the default database for you. While this is the expected behavior of `postgres`, this means that it will not accept incoming connections during that time. This may cause issues when using automation tools, such as `docker-compose`, that start several containers simultaneously.
+
+Also note that the default `/dev/shm` size for containers is 64MB. If the shared memory is exhausted you will encounter `ERROR:  could not resize shared memory segment . . . : No space left on device`. You will want to pass [`--shm-size=256MB`](https://docs.docker.com/engine/reference/run/#runtime-constraints-on-resources) for example to `docker run`, or alternatively in [`docker-compose`](https://docs.docker.com/compose/compose-file/#shm_size)