You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This Docker image extends `percona/percona-postgresql-operator:2.6.0-ppg16.8-postgres` with configurations to reduce the chances of PostgreSQL being killed by the Out-of-Memory (OOM) killer in Linux.
4
+
5
+
## Features
6
+
7
+
- Sets OOM score adjustment to `-900` for the Patroni process (which manages PostgreSQL)
8
+
9
+
## How It Works
10
+
11
+
This image works with the Percona PostgreSQL Operator architecture:
12
+
13
+
1. Patroni is the process manager that starts and manages PostgreSQL
14
+
2. Our wrapper script sets the OOM score adjustment to -1000 for the Patroni process
15
+
3. This adjustment is inherited by PostgreSQL processes, protecting them from OOM killer
16
+
4. Custom PostgreSQL configuration is provided to optimize memory usage
17
+
5. The wrapper script preserves the original entrypoint behavior of the parent image
18
+
19
+
## Usage
20
+
21
+
### Basic Usage
22
+
23
+
```bash
24
+
docker build -t oom-protected-postgres .
25
+
docker run -d --name postgres oom-protected-postgres
26
+
```
27
+
28
+
## References
29
+
30
+
-[PostgreSQL documentation on kernel resources](https://www.postgresql.org/docs/current/kernel-resources.html)
31
+
-[Percona blog on Out-of-Memory killer](https://www.percona.com/blog/out-of-memory-killer-or-savior/)
0 commit comments