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.
Ok probably the last suggestion for a bit... the final step in building a production-grade supabase cluster was enabling "batteries included" pgsodium initialization to support the supabase vault.
My vault operations were initially failing due to lack of a pgsodium master key.
Looking through the codebase didn't show that initialization happening, so I referenced the way Supabase handles this initialization in their dockerized PG (I'm using pg 15):
https://github.com/supabase/postgres/blob/develop/Dockerfile-15
Following their example, this PR initializes a server-managed secret key for the database with a new task,
pgsodium.yml
.This task runs after
pg_util
if pgsodium is inpg_extension_list
.I have tested this on ubuntu 22 for a new cluster, and adding pgsodium to an existing cluster.
I am not sure how long this will be needed because:
https://supabase.com/docs/guides/database/extensions/pgsodium
However, our current vault still requires pgsodium so this was a necessary fix.