Hi there - firstly, thank you very much for this library! We heavily rely on it at Dataform for connecting to user Postgres/Redshift instances, and that's why we thought it right to send some sponsorship your way (via @lewish).
We're occasionally receiving this error in production, and we're not sure what we're doing wrong:
TypeError: Cannot read property 'removeListener' of null
at Cursor.handleError (<snipped>/node_modules/pg-cursor/index.js:141:19)
Our usage of pg is pretty custom, so it's entirely possible we're doing something bad. You can see all of our code using the library here. (Note that much of the complexity is down to us doing a bunch of work to invalidate a Client in a Pool every time an Error is thrown, as we've noticed that Client instances that have received errors occasionally seem to become corrupted: it's as though Postgres/Redshift on the other end is sending some data back to an errored Client after pg has already released it back to the Pool - happy to provide more explanation if that's useful.)
Let me know if there's other useful context I can provide. I'm also very happy to jump on a quick video call if that's helpful!
Hi there - firstly, thank you very much for this library! We heavily rely on it at Dataform for connecting to user Postgres/Redshift instances, and that's why we thought it right to send some sponsorship your way (via @lewish).
We're occasionally receiving this error in production, and we're not sure what we're doing wrong:
Our usage of
pgis pretty custom, so it's entirely possible we're doing something bad. You can see all of our code using the library here. (Note that much of the complexity is down to us doing a bunch of work to invalidate aClientin aPoolevery time anErroris thrown, as we've noticed thatClientinstances that have received errors occasionally seem to become corrupted: it's as though Postgres/Redshift on the other end is sending some data back to an erroredClientafterpghas already released it back to thePool- happy to provide more explanation if that's useful.)Let me know if there's other useful context I can provide. I'm also very happy to jump on a quick video call if that's helpful!