Skip to content

Remove deprecated pool options from defaults #1438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 3, 2017
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