Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(SUP-2571) Purge legacy cron jobs if present #97

Merged
merged 1 commit into from
Oct 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
}
}
}