Skip to content

Commit

Permalink
Merge pull request #97 from gavindidrichsen-forks/gavindidrichsen/pr/…
Browse files Browse the repository at this point in the history
…remove_legacy_crons

(SUP-2571) Purge legacy cron jobs if present
  • Loading branch information
jarretlavallee authored Oct 6, 2021
2 parents 48cdff6 + bd1cea7 commit c99af79
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions manifests/pg_repack.pp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,19 @@
}
}

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

0 comments on commit c99af79

Please sign in to comment.