Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我可以让 PgBouncer 在事务池中保留 PGOPTIONS 环境变量来配置 GUC 参数吗?或者是否有另一种方法可以在 PgBouncer 中配置这些参数,使其适用于所有连接?
我特别需要设置一些pg_trgm 参数
您可以connect_query在数据库定义中使用该选项,例如
connect_query
mydb = host=myhost dbname=mydb connect_query='set pg_trgm.similarity_threshold=0.5'
connect_query可以是任何 SQL 语句。