From 82e4d76f8bb93a3517a71ebb0c710307101476be Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Silva Date: Tue, 12 May 2020 19:44:11 -0300 Subject: [PATCH] Teach pg10 template how to install itself for rollbacks --- templates/postgres.10.template.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/templates/postgres.10.template.yml b/templates/postgres.10.template.yml index b9f85ed..63f06bd 100644 --- a/templates/postgres.10.template.yml +++ b/templates/postgres.10.template.yml @@ -19,6 +19,8 @@ hooks: to: sv start postgres || exit 1 run: + - exec: apt-get remove -y postgresql-12 postgresql-client-12 postgresql-contrib-12 + - exec: apt-get update && apt-get install -y postgresql-10 postgresql-client-10 postgresql-contrib-10 - exec: mkdir -p /shared/postgres_run - exec: chown postgres:postgres /shared/postgres_run - exec: chmod 775 /shared/postgres_run @@ -35,6 +37,7 @@ run: contents: | #!/bin/sh exec 2>&1 + echo -1000 >/proc/self/oom_score_adj HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/10/bin/postmaster -D /etc/postgresql/10/main - file: -- 2.25.1