Use the db_batch_port for copy

This commit is contained in:
Rafa de la Torre 2018-07-20 10:22:54 +02:00
parent b88a45889f
commit 763134437b

View File

@ -8,7 +8,10 @@ const ACTION_FROM = 'from';
module.exports = class StreamCopy {
constructor(sql, userDbParams) {
this.pg = new PSQL(userDbParams);
const dbParams = Object.assign({}, userDbParams, {
port: global.settings.db_batch_port || userDbParams.port
});
this.pg = new PSQL(dbParams);
this.sql = sql;
this.stream = null;
}