You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+34-2
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,40 @@ For richer information consult the commit log on github with referenced pull req
4
4
5
5
We do not include break-fix version release in this file.
6
6
7
-
### v5.2.0
8
-
- Replace internal pooling code with [pg-pool](https://github.com/brianc/node-pg-pool). This is the first step in eventually deprecating and removing the singleton `pg.connect`. The pg-pool constructor is exported from node-postgres at `require('pg').Pool`. It provides a backwards compatible interface with `pg.connect` as well as a promise based interface & additional niceties.
7
+
### v6.0.0
8
+
9
+
#### Breaking Changes
10
+
- Remove `pg.pools`. There is still a reference kept to the pools created & tracked by `pg.connect` but is not considered private and should not be used. `pg.connect` itself will be deprecated in favor of instantiating pools directly via `new pg.Pool()`. Accessing this API directly was uncommon and was _supposed_ to be private but was incorrectly documented on the wiki. Therefore, it is a breaking change of an (unintentionally) public interface to remove it.
11
+
12
+
#### New features
13
+
14
+
- Replace internal pooling code with [pg-pool](https://github.com/brianc/node-pg-pool). This is the first step in eventually deprecating and removing the singleton `pg.connect`. The pg-pool constructor is exported from node-postgres at `require('pg').Pool`. It provides a backwards compatible interface with `pg.connect` as well as a promise based interface & additional niceties.
15
+
16
+
Basically what you can now do is create an instance of a pool and don't have to rely on the `pg` singleton for anything:
17
+
18
+
```
19
+
var pg = require('pg')
20
+
21
+
var pool = new pg.Pool()
22
+
23
+
// your friendly neighboorhood pool interface, without the singleton
24
+
pool.connect(function(err, client, done) {
25
+
// ...
26
+
})
27
+
```
28
+
29
+
Promise support & other goodness lives now in [pg-pool](https://github.com/brianc/node-pg-pool).
30
+
31
+
__Please__ read the readme at [pg-pool](https://github.com/brianc/node-pg-pool) for the full api.
32
+
33
+
- Included support for tcp keep alive. Enable it as follows:
34
+
35
+
```js
36
+
var client =newClient({ keepAlive:true })
37
+
```
38
+
39
+
This should help with backends incorrectly considering idle clients to be dead and prematurely disconnecting them.
40
+
9
41
10
42
### v5.1.0
11
43
- Make the query object returned from `client.query` implement the promise interface. This is the first step towards promisifying more of the node-postgres api.
0 commit comments