8000 chore: update pg upgrade scripts by pcnc · Pull Request #485 · supabase/postgres · GitHub
[go: up one dir, main page]

Skip to content

chor 8000 e: update pg upgrade scripts #485

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

Merged
merged 13 commits into from
Feb 2, 2023
Merged

chore: update pg upgrade scripts #485

merged 13 commits into from
Feb 2, 2023

Conversation

pcnc
Copy link
Member
@pcnc pcnc commented Jan 18, 2023

Fixes

  • PG_VERSION file did not exist
  • Initiate script doesn’t handle loop devices existing or something (unclear)
    • initiate script assumes the only present block devices are located on /dev/nvme* and excludes nvme[0-1], mounting the following device
    • older instances (pre-ebssurrogate?) also have /dev/loop* devices present
  • Stop Postgrest, gotrue while we’re upgrading (or restoring)
    • retries for this job end up stopping the newer instance as well
  • poll upgrade completion status
  • use pgsodium key stored in middleware db if it does not exist
  • handle special device errors
  • run generated .sql files such as update-extensions.sql on new instance
  • bail if complete operation already in progress

@pcnc pcnc requested a review from a team as a code owner January 18, 2023 15:14

sleep 5
service postgresql restart

if [[ $(systemctl is-active gotrue) == "inactive" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this incorrectly start these services for projects with a separate kps instance?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. removed in updated script versions. It's up to the worker to manage services

@pcnc pcnc force-pushed the pcnc/db-upgrade-scripts branch from 28c4ea2 to f46029e Compare February 1, 2023 20:25
@pcnc pcnc force-pushed the pcnc/db-upgrade-scripts branch from f46029e to 7d6f27d Compare February 1, 2023 20:26
@pcnc pcnc requested review from darora and a team February 1, 2023 20:28
@pcnc pcnc merged commit 784f998 into develop Feb 2, 2023
@pcnc pcnc deleted the pcnc/db-upgrade-scripts branch February 2, 2023 12:46
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
* chore: update pg upgrade scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0