From fd6d8a836aa613f509ee3422c724097ea263d176 Mon Sep 17 00:00:00 2001
From: Evangelos Foutras <evangelos@foutrelis.com>
Date: Wed, 20 Apr 2022 22:25:32 +0300
Subject: [PATCH] postgres: upgrade_pg: run vacuumdb after upgrading

Also remove the suggestion to call delete_old_cluster.sh; it's now being
created under /tmp and it only contains a command to remove the old data
directory. (We can do the latter ourselves after some time has passed.)
---
 roles/postgres/files/upgrade_pg.sh | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/roles/postgres/files/upgrade_pg.sh b/roles/postgres/files/upgrade_pg.sh
index 87bba1920..460f07b58 100755
--- a/roles/postgres/files/upgrade_pg.sh
+++ b/roles/postgres/files/upgrade_pg.sh
@@ -65,6 +65,4 @@ systemctl unmask postgresql.service
 systemctl daemon-reload
 systemctl start postgresql.service
 
-# We probably want to manually delete things for now in case this script misses
-# some stuff
-#su - postgres -c /var/lib/postgres/delete_old_cluster.sh
+su - postgres -c 'vacuumdb --all --analyze-in-stages'
-- 
GitLab