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

chore: bump pg_tle version to 1.3.2 #819

Merged
merged 6 commits into from
Jan 18, 2024
Merged

chore: bump pg_tle version to 1.3.2 #819

merged 6 commits into from
Jan 18, 2024

Conversation

imor
Copy link
Contributor

@imor imor commented Dec 4, 2023

What kind of change does this PR introduce?

  • upgrade pg_tle from v1.0.4 to v1.3.2

Additional context

Add any other context or screenshots.

Action Items

  • New extension releases were Checked for any breaking changes
  • Extensions compatibility Checked
  • Backup and Restore Checked
    • Proceed to backup testing while extensions are enabled
      • After every restore, re-run the tests specified at point 3.1

Extensions compatibility testing

  1. Enable every extension
    1. Check Postgres’ log output for any error messages while doing so
      1. This might unearth incompatibilities due to unsupported internal functions, missing libraries, or missing permissions
  2. Disable every extension
    1. Check Postgres’ log output for any cleanup-related error messages
  3. Re-enable each extension
    1. Run basic tests against the features they offer, e.g.:
      1. pg_net - execute HTTP requests
      2. pg_graphql - execute queries and mutations
      3. …to be filled in

Backup Testing

Follow the testing steps steps for all the following cases:

  • Pause on new Postgres version, restore on new Postgres version
  • Pause on older Postgres version, restore on new Postgres version
  • Run a single-file backup backup, restore the backup

Testing steps

  1. Generate dummy data
    • the ‘Countries’ or ‘Slack clone’ SQL editor snippets are decent datasets to work with, albeit limited
  2. Save a db stats snapshot file
    • Do this by running supa db-stats gather -p <project_ref>
  3. Backup the database, through pausing the project, or otherwise
  4. Restore the backup, through unpausing the project or cli
  5. Check the data has been recovered successfully
    1. Visual checks/navigating through the tables works
    2. Run supa db-stats verify against the project and the previously saved file

@imor imor requested review from a team as code owners December 4, 2023 04:52
Copy link
Contributor

@darora darora left a comment

Choose a reason for hiding this comment

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

Please confirm that you've tested both pg_upgrades and pause/restores and ensured that the upgrade does not break either.

@@ -1 +1 @@
postgres-version = "15.1.0.137"
postgres-version = "15.1.0.138-pg_tle"
Copy link
Contributor

Choose a reason for hiding this comment

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

Please test on this branch and remove suffix once ready for merge

@imor
Copy link
Contributor Author

imor commented Dec 6, 2023

Please confirm that you've tested both pg_upgrades and pause/restores and ensured that the upgrade does not break either.

Test steps I performed:

  1. Create a project on supabase.green with version 15.1.0.138-pg_tle.
  2. Install dbdev in-db client.
  3. Install pg_idkit TLE version 0.0.4.
  4. Pause the project.
  5. Restore the project. The restore succeeded and pg_idkit is reverted to the default version 0.0.1 as expected.
  6. But for some reason the postgres role can't login after restore. Had to login as superuser and alter role postgres login to continue testing. Not sure what caused the postgres role's login to be disabled.
  7. Try to upgrade to 15.1.0.137 (the only version shown for upgrade) but got this error: {"message":"Project is not in a ready state to perform an upgrade"}. Again not sure what caused it.

In summary, the original pg_tle pause/restore appears to have been fixed but I'm not sure what's causing these two issues:

  1. postgres role can't login after restore.
  2. Can't upgrade project to 15.1.0.137.

@darora my project ref on supabase.green is hbkcxauckeneyztwovoh in case you can help figure out what caused these failures.

@darora
Copy link
Contributor

darora commented Dec 6, 2023

Will do - I believe the restore has not completed.

@imor
Copy link
Contributor Author

imor commented Jan 16, 2024

Hey @darora can you please approve this PR. It needs an approval from supabase/backend team.

@imor imor requested a review from darora January 17, 2024 07:17
@imor
Copy link
Contributor Author

imor commented Jan 17, 2024

BTW the scope for this PR no longer includes the fixes for pause/restore. We want to upgrade pg_tle just for the support of allowing the @ character in a TLEs name and fixing another bug.

@imor imor merged commit 23fe09f into develop Jan 18, 2024
8 checks passed
@imor imor deleted the bump_pg_tle branch January 18, 2024 10:57
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