3 ms·
I really like the simplicity of this approach, but are the Postgres calls asynchronous? If not, it won't scale...
by jahewson 13y ago
I really like the simplicity of this approach, but are the Postgres calls asynchronous? If not, it won't scale...
- mfenniak 13y agoI think the answer is yes, it performs the calls asynchronously. I've been searching through the source code for the postgres module (https://github.com/FRiCKLE/ngx_postgres https://github.com/FRiCKLE/ngx_postgres), and it appears to use the libpq asynchronous API (http://www.postgresql.org/docs/9.2/static/libpq-async.html http://www.postgresql.org/docs/9.2/static/libpq-async.html). Of course, one could easily use the async API in a non-async manner, so I'm not 100% certain.
- hbbio 13y agoThe MySQL driver is async, the Postgres one should be as well.