Conversation
|
We're facing the |
|
@Magellol On pg 7.4.1? |
|
We're running pg EDIT: Ah I just checked out the commits and I see that 4cf67b2 might help us. Will upgrade and report back. Thanks |
|
We've been having issues with Azure PostgreSQL keeping connections around (i.e. Is there any reason not to close the TCP connection from the client upon sending |
|
I am running into this issue on managed PG on Azure with ssl as well (i.c.w. postgrator). |
|
@charmander Is there a reason not to merge this PR? Other libraries seem to behave this way. Or is there's any reason why terminating the stream from the client end is a bad idea? |
|
I think the socket should be closed. The Postgres docs suggest clients do exactly that after sending a final termination message: https://www.postgresql.org/docs/current/static/protocol-flow.html#id-1.10.5.7.10
I haven't reviewed the PR in total to see if there's somewhere else that is expecting to be able to close the connection but the overall idea seems sound. |
|
From my previous #1386 (comment) this I'm wondering if closing the socket would actually solve this issue on our end. |
|
@sheepcount I think it’s a good idea. #1608 makes me a bit uncomfortable right now, though, because it’s pretty much a delayed |
|
@charmander I think delaying |
|
@sheepcount, @charmander good point, my stream kung-fu is not as strong, so apologies for not the most optimal solution in #1608 I quickly tried solution proposed by @sheepcount, but that breaks https://github.com/brianc/node-postgres/blob/master/test/integration/client/quick-disconnect-tests.js (the modification is in https://github.com/brianc/node-postgres/compare/master...Vratislav:end-stream-write-in-end?expand=1) |
|
@sheepcount Sorry, I forgot to clarify:
Parts of the connection process don’t check for |
This should solve issue 1344.