Skip to content

Commit c99af79

Browse files
Merge pull request #97 from gavindidrichsen-forks/gavindidrichsen/pr/remove_legacy_crons
(SUP-2571) Purge legacy cron jobs if present
2 parents 48cdff6 + bd1cea7 commit c99af79

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

manifests/pg_repack.pp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,19 @@
6161
}
6262
}
6363

64-
# Legacy cleanup
64+
# Ensure legacy vaccum and pg_repack crons are purged.
65+
# If someone upgrades from an ancient v0.x version of the pe_databases module to 2.0 or newer,
66+
# the old cron jobs running vaccuum full will not be cleaned up. This can result in a deadlock
67+
# when both pg_repack and vacuum full attempt to update a table
6568
$legacy_crons = [
6669
'pg_repack facts tables', 'pg_repack catalogs tables', 'pg_repack other tables',
67-
'pg_repack reports tables', 'pg_repack resource_events tables'
70+
'pg_repack reports tables', 'pg_repack resource_events tables',
71+
'VACUUM FULL facts tables',
72+
'VACUUM FULL catalogs tables',
73+
'VACUUM FULL other tables',
74+
'Maintain PE databases',
6875
]
6976
cron { $legacy_crons:
7077
ensure => absent,
71-
}
7278
}
79+
}

0 commit comments

Comments
 (0)