Closed ruslantalpa closed 8 years ago
It should work. What errors are you seeing?
i am not seeing errors, i can't figure out how to call set_current_pear with host/posrt/user/pass/db parameters when it takes just 2 parameters.
postgres_server ip[:port] dbname=dbname user=user password=pass
vs
balancer.set_current_peer(host, port)
@ruslantalpa Oh yes, ngx_postgres provides its own postgres_server
directive here. So no love.
How about just using the pgmoon
Lua library that is based on ngx_lua module's nonblocking cosocket API? See
https://github.com/leafo/pgmoon
It's much more flexible than this ngx_postgres module.
Yes i will do that, just thought i could get away with something internal since i only use it to run one specific query and get the result internally using capture which.
PS: Thank you so much for your work on openresty, it's an amazing package.
Is there any way of making the two compatible? The usecase is that i do not want (can't) to hardcode the connection info in the config file, i have to read it from the env. For a proxy upstream i can do this
How can i have something similar with ngx_postgrest? Thank you