This summarizes the common forms, but omits some of the more particular,
and unnecessary forms, such as specifying UNIX domain sockets with
`pg://` URLs.
When error happens on socket, potentially dead socket is kept open indefinitely by calling "connection.end()".
Similar issue is that it keeps socket open until long-running query is finished even though the connection was ended.
Since I believe GitHub Sponsors is your preferred way to donate now, maybe you want to totally get rid of the mention of Patreon, or mention that GitHub Sponsors is preferred?
* Remove double-send of ssl request packet
I missed the fact that we are already sending this. Since I don't have good test coverage for ssl [which I am planning on fixing next](https://github.com/brianc/node-postgres/issues/2009) this got missed.
I'm forcing an SSL test on travis. This will break for me locally as I don't have SSL enabled on my local test DB. Something I will also remedy.
* Prevent requeuing a broken client
If a client is not queryable, the pool should prevent requeuing instead
of strictly enforcing errors to be propagated back to it.
* Write tests for change
* Use node 13.6 in travis
Some weird behavior changed w/ async iteration in node 13.7...I'm not sure if this was an unintentional break or not but it definitely diverges in behavior from node 12 and earlier versions in node 13...so for now going to run tests on 13.6 to unblock the tests from running while I track this down.
* Update packages/pg-pool/test/releasing-clients.js
Co-Authored-By: Charmander <~@charmander.me>
* Update .travis.yml
Co-authored-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
Co-authored-by: Charmander <~@charmander.me>
* Fix tests skipped because of missing suffixes
Mocha will happen eventually!
* Skip password tests when they can’t work
Will be made more visible when tests are ported to Mocha.
* Add testing with a user with a password to CI
Should reveal a bug in the password enumerability work, I think.
* Explain new CI matrix entry for password authentication
[ci skip]
* Fix pg-query-stream
There were some subtle behaviors with the stream being implemented incorrectly & not working as expected with async iteration. I've modified the code based on #2050 and comments in #2035 to have better test coverage of async iterables and update the internals significantly to more closely match the readable stream interface.
Note: this is a __breaking__ (semver major) change to this package as the close event behavior is changed slightly, and `highWaterMark` is no longer supported. It shouldn't impact most usage, but breaking regardless.
* Remove a bunch of additional code
* Add test for destroy + error propagation
* Add failing test for destroying unsubmitted stream
* Do not throw an uncatchable error when closing an unused cursor
Working on fixing some timing issues in pg-query-stream it uncovered an issue where the cursor is firing its 'close' callback before it's actually entirely ready to dispatch another query. This change makes the close callback trigger when the connection re-enters `readyForQuery` state.