Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions lib/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,15 @@ module.exports = {
// binary result mode
binary: false,

// Connection pool options - see https://github.com/coopernurse/node-pool
// Connection pool options - see https://github.com/brianc/node-pg-pool

// number of connections to use in connection pool
// 0 will disable connection pooling
poolSize: 10,
max: 10,

// max milliseconds a client can go unused before it is removed
// from the pool and destroyed
poolIdleTimeout: 30000,

// frequency to check for idle clients within the client pool
reapIntervalMillis: 1000,

// if true the most recently released resources will be the first to be allocated
returnToHead: false,

// pool log function / boolean
poolLog: false,
idleTimeoutMillis: 30000,

client_encoding: '',

Expand Down
9 changes: 8 additions & 1 deletion test/integration/client/configuration-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ suite.test('default values are used in new clients', function () {
password: null,
port: 5432,
rows: 0,
poolSize: 10
max: 10,
binary: false,
idleTimeoutMillis: 30000,
client_encoding: '',
ssl: false,
application_name: undefined,
fallback_application_name: undefined,
parseInputDatesAsUTC: false
})

var client = new pg.Client()
Expand Down