Merge pull request #6007 from kabaros/pg-pool-settings

Preserve pool setttings when there is a schema
This commit is contained in:
Alexandre BODIN 2020-04-30 17:45:07 +02:00 committed by GitHub
commit 9414eb717b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,8 +178,7 @@ module.exports = strapi => {
if (_.isString(_.get(options.connection, 'schema'))) {
options.pool = {
min: _.get(connection.options, 'pool.min') || 0,
max: _.get(connection.options, 'pool.max') || 10,
...options.pool,
afterCreate: (conn, cb) => {
conn.query(
`SET SESSION SCHEMA '${options.connection.schema}';`,