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

Issues that came up when implementing #1

Open
michaelwills opened this issue Nov 9, 2022 · 2 comments
Open

Issues that came up when implementing #1

michaelwills opened this issue Nov 9, 2022 · 2 comments

Comments

@michaelwills
Copy link

Thank you for this! I have two replicas in other regions running 🚀!

I hit a few issues which I may be able to make a PR for in the coming days. They aren't major but did take a bit of digging:

Briefly:

  • Being new to replication, I didn't realize each subscription needs a unique name
  • I had the pg_graphql extension enabled on my primary. Executing the schema on the read replicas didn't fail, but the resultant structure didn't actually match. graph._type was the first error. I disabled graphql which brought that part in line.
  • New projects have pgsodium enabled by default it seams, making the schema's different. My primary was from several months back.
  • Enabling pgsodium on the primary does add it to the schema dump, but it fails as the pgsodium.key relation wasn't found. I'll have to check my notes for the error.
  • Disabling pgsodium manually on all three, going through the steps, then re-enabling them afterwards worked. Doing a structure diff showed they were all identical. Extensions were all a go then.
  • Data still didn't update so I put in all the log levels just in case. The logging Errors template doesn't include Warning which is needed to see the worker error.

Once I updated the max workers and restarted it immediately backfilled and changes were being propagated.

Thanks again!

@burggraf
Copy link
Owner

burggraf commented Nov 9, 2022

Thanks for the great, detailed feedback. Our basic migration document has recently changed so we may want to update this repo to help solve some of the stuff you ran into. See:
https://supabase.com/docs/guides/platform/migrating-and-upgrading-projects

@askkaz
Copy link

askkaz commented Aug 16, 2023

@burggraf it seems that the migration document linked there would result in some downtime, but the approach in this repo would still be better for less downtime, right?

I'm trying to upgrade our pg version. My plan was to use the instructions here to create a replica and then once it was synced, change my app to use the credentials for the new replica. Then delete the old database. Would that still work?

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

No branches or pull requests

3 participants