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
Postgres connection strings support an options query parameter where one can add a specific search_path to be used for the connection:
POSTGRES_CONNECTION_STRING?options=-c%20search_path=custom_schemaThis works if I use the direct Postgres connection string shown on the Supabase dashboard but does not work with the connection pooler string (Supavisor). Is this by design? I ran multiple tests and the search path in my connection only updates when I use the direct connection string.
Expected behavior
The search path to be set as specified in the additional parameters passed to the connection pooler string.
Additional context
I am using the connection pooler in Transaction mode.
Activity
4I was also using latest version of Supabase with connection pooler in transaction mode and the custom schemas didn't work with the pooler, they however worked with direct connection. Somewhat annoying that this issue has still not been fixed. In the end I switched from Supabase connection pooler to pgcat, which at least works as intended.
Leaving this here, since this worked for me: As a workaround using the alternative syntax seems to fix the issue; e.g.:
options: `--search_path=${schema}`,Hey! This looks like a great issue to pick up. I'd love to contribute — could you assign it to me?
Did https://github.com/supabase/supavisor/commit/163e4fa2269a3cf57ebf92b80d0a5c04435a4f44 address your issue?