首页 > 解决方案 > 如何在 Play Framework 中设置 Postgres 参数

问题描述

我正在尝试temp_file_limit通过 Play Framework(2.7 版)配置向我的 Postgres DB 添加参数。我尝试application.conf如下添加参数,但这并不限制 Postgres DB 处理的临时文件大小。

db.postgresql.temp_file_limit = 10KB- 不工作

temp_file_limit = 10KB- 不工作

db.default.temp_file_limit = 10KB- 不工作

我当前的 Postgres 设置application.conf如下(工作正常)。

db.postgresql.driver = org.postgresql.Driver
db.postgresql.url = "jdbc:postgresql://localhost:5432/postgres"
db.postgresql.username = postgres
db.postgresql.password = XXXXXXXXXXX

下面是 Postgres 的上述参数和其他类似参数的描述。 https://postgresqlco.nf/doc/en/param/temp_file_limit/

我知道我们可以通过SET xxx查询设置这些参数,但如果可能的话,我想将其设置为配置application.conf

有谁知道如何在Play Framework中配置temp_file_limitPostgres 参数?application.conf

标签: postgresqlscalaplayframeworkconfiguration

解决方案


推荐阅读