K8 spg 786 - #1734
Draft
nmarukovich wants to merge 4 commits into
Draft
Conversation
Collaborator
commit: f70c061 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGE DESCRIPTION
Problem:
The operator drops the pg_cron extension from the database and destroys all
jobs stored in cron.job. This happens to users who install pg_cron as a custom
extension from their own storage. It also happens when a user moves pg_cron
from the custom list to the builtin flags.
Cause:
pgCronandsetUserwere plain bools. If the user did not set them, theoperator set them to
false. So the operator cannot see the difference between"the user did not ask for pg_cron" and "the user wants pg_cron removed", and it
runs
DROP EXTENSION IF EXISTS pg_cron.The custom extensions loop drops an extension as soon as it is removed from the
custom list, even if the user enabled the same extension as a builtin one.
pg_cron
**Solution:**PGCronandSetUserare*boolnow: nil means the flag is not set and the operator leaves the extension alone, false means drop it, true means create it. We do not setfalse` for these two flags anymore. With nil we also do not addpg_cron to shared_preload_libraries, so postgres does not restart.
The custom extensions loop does not drop an extension if the same extension is
enabled as a builtin one. Now a user can move pg_cron from the custom list to
the builtin flags and keep the data.
new upgrade e2e tests
custom-extensions and upgrade-minor were extended.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability