Skip to content

Commit 7e0c1e5

Browse files
Jonathan S. Katzjkatz
authored andcommitted
Expand access to POSIX shared memory for PostgreSQL container
By default, the container runtime engine uses 64MiB of POSIX shared memory, regardless of the resources that are given to the container. Give this is inadequately low for larger PostgreSQL installs, its necessary to expand the shared memory that the PostgreSQL container has access to. Using guidance from the OpenShift documentation[1], this patch mounts the shared memory directory to the PostgreSQL container to expand the access to POSIX shared memory. Issue: #1358 [1] https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html/developer_guide/dev-guide-shared-memory
1 parent 4c0cff8 commit 7e0c1e5

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

conf/postgres-operator/cluster-deployment.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@
171171
}, {
172172
"mountPath": "/recover",
173173
"name": "recover-volume"
174-
}, {
174+
},
175+
{
176+
"mountPath": "/dev/shm",
177+
"name": "dshm"
178+
},
179+
{
175180
"mountPath": "/crunchyadm",
176181
"name": "crunchyadm"
177182
}
@@ -286,7 +291,14 @@
286291
}, {
287292
"name": "crunchyadm",
288293
"emptyDir": {}
289-
}, {
294+
},
295+
{
296+
"name": "dshm",
297+
"emptyDir": {
298+
"medium": "Memory"
299+
}
300+
},
301+
{
290302
"name": "pgconf-volume",
291303
"projected": {
292304
"sources": [

installers/ansible/roles/pgo-operator/files/pgo-configs/cluster-deployment.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,12 @@
171171
}, {
172172
"mountPath": "/recover",
173173
"name": "recover-volume"
174-
}, {
174+
},
175+
{
176+
"mountPath": "/dev/shm",
177+
"name": "dshm"
178+
},
179+
{
175180
"mountPath": "/crunchyadm",
176181
"name": "crunchyadm"
177182
}
@@ -286,7 +291,14 @@
286291
}, {
287292
"name": "crunchyadm",
288293
"emptyDir": {}
289-
}, {
294+
},
295+
{
296+
"name": "dshm",
297+
"emptyDir": {
298+
"medium": "Memory"
299+
}
300+
},
301+
{
290302
"name": "pgconf-volume",
291303
"projected": {
292304
"sources": [

0 commit comments

Comments
 (0)