PhilWaldmann / openrecord

Make ORMs great again!
https://openrecord.js.org
MIT License
486 stars 38 forks source link

Connection Issues in Production #46

Closed SampsonCrowley closed 7 years ago

SampsonCrowley commented 7 years ago

I have singled out the reason I was having connection issues in https://github.com/PhilWaldmann/openrecord/issues/43

node-pg and node-pg-native do not work with the semi-popular pgpool load balancer. there is something about the way it handles prepared statements that node-pg never becomes aware that an error has been returned

You should add a disclaimer that your library won't work when used with pgpool

PhilWaldmann commented 7 years ago

I don't see any possibility for a user to use pg-pool with OpenRecord, because the connection is established by knex. Do you have an example?

SampsonCrowley commented 7 years ago

no not pg-pool, PGPool. very different. PGPool is a load balancer for postgres that sits between your application server and the actual postgres backend. As of today, it is the only production ready Postgres load balancer, and as such, is decently popular for those that actually build their entire infrastructure.

there's nothing you can do to fix the issue until node-pg has been properly patched, but a disclaimer would still be a good option in the readme