supavisor
supavisor copied to clipboard
Incorrect client response when database on Postgres instance doesn't exist
Bug report
- [x] I confirm this is a bug with Supabase, not with my own application.
- [x] I confirm I have searched the Docs, GitHub Discussions, and Discord.
Describe the bug
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:
https://github.com/supabase/supavisor/assets/5532241/b6a15876-06ee-40b6-9e1b-e071025f68cd
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
psqlinto a database that doesn't exist.
Expected behavior
Some sort of client error that clearly spells out there was an issue connecting to a database that doesn't exist.
Supavisor needs to stop doing additional work (following is repeated over and over):
16:22:27.870 [error] Error auth response ["SFATAL", "VFATAL", "C3D000", "Mdatabase \"bad\" does not exist", "Fpostinit.c", "L885", "RInitPostgres"] file=lib/supavisor/db_handler.ex line=227 pid=<0.987.0> project=dev_tenant user=postgres mode=transaction
16:22:27.870 [error] Connection closed when state was authentication file=lib/supavisor/db_handler.ex line=348 pid=<0.984.0> project=dev_tenant user=postgres mode=transaction
16:22:27.870 [error] Connection closed when state was authentication file=lib/supavisor/db_handler.ex line=348 pid=<0.987.0> project=dev_tenant user=postgres mode=transaction