I have a C# app connecting to a postgres database, through pg_bouncer, using Npgsql. In my connection string, I include SearchPath
. Npgsql picks this up and sets the search_path
parameter in the startup packet.
Pg_bouncer seems to not like that search_path
parameter, which would cause the initial connection to fail (Unsupported startup parameter: search_path
). To get around this, we listed it in the ignore_startup_parameters list for pg_bouncer.
The connection now gets through to the database fine, but totally ignores any SearchPath declared in the connection string. Every query now, instead of hitting the correct schema, selects out of the Public schema.
How can I get Postgres to respect the SearchPath again?