fix: enable connection to custom database name other than 'postgres' #254
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.
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
I can only connect to the
postgres
database when connecting via Supavisor pooler.What is the new behavior?
I can connect to another database other than
postgres
database.Additional context
This addresses the GH issue Supavisor forces request to "postgres" database even when other database is specified #234.
While this solution enables connecting to other database, that's not
postgres
database, it presents other problems.Here are some things that should be tackled alongside this change for completeness:
postgres
database then it will default to other database. Whichever database a tenant connects to first will be the default one.2. Supavisor will continuously attempt to connect to a database even when that database doesn't exist. However, the client doesn't get the proper error feedback that database doesn't exist. See screen recording:Spun this out into its own issue: #257
Screen.Recording.2024-01-12.at.17.30.06.mov