returns IO WAIT in case of the "connection made" state. * added a test for reproducing a stale event handling bug at least in ngx_epoll_module. * introduced the TEST_NGINX_POSTGRESQL_HOST environment to specify a remote Pg server to test against.
…not found at all and returns 500 in this case instead of returning empty response.
…es.t is still failing due to the "postgres_rewrite changes" feature assumes the rows_affected slot to mean "rows changed", but this is no longer true in pg 9.x. hopefully Piotr Sikora can address this issue for us :)
…o values for select queries.
…now requires a pool argument.
…section to READE, especially documented the LIBPQ_INC and LIBPQ_LIB environments.
… we should have defined rds_rough_col_type_t as a type rather than a global variable. thanks @姜大炮.
This is second part of the "write proper SQL queries" campaign. Queries that return more than one value will result in "500 Internal Server Error" response.
This is more general approach, which forces writing proper SQL queries instead of filtering results on the nginx side and allows for sending output from multiple rows to end-users. Discussed with Silly Sad.
Based on patch from Silly Sad.
Because ngx_http_upstream_finalize_request sends NGX_HTTP_LAST, having last_buf=1 in our module meant that last two chains always had last_buf=1, which resulted in duplicated last chunk sent for HTTP/1.1 requests. This pretty much killed keep-alived requests. Reported by Silly Sad, diagnosed by Maxim Dounin. Same issue was independently diagnosed and fixed in ngx_drizzle by Yichun Zhang (agentzh) few days ago.
…art from most of the ngx_log_error calls in ngx_postgres_keepalive.c because they are duplicate with the << upstream: "postgres://ip.add.re.ss:port" >> part automatically generated by the ngx_http_log_error_handler function in the nginx core.
…d "sockaddr" fields instead of passing pointers around.
…, "sockaddr", and "socklen" fields for the connection from the pool such that we can get more detailed error log messages with the "upstream: postgres://ip.add.re.ss:port" bit.
Calling PQconnectStartParams(NULL, *, *) results in SIGSEGV.
The problem is that this value shouldn't be used in the first place (see next commit). This reverts commit 1ed9f15.
This is great feature, but the way it hooks into configuration must be rewritten (as discussed with Yichun on the IRC). This reverts commit 4187c57.
I've just tested each case and there is no such bug in ngx_postgres, each error.log entry contains correct upstream peer name. I'll re-add "pc->name = &peer->name;" in case nginx or 3rd-party modules will ever use it, but "pc->name" isn't used by ngx_postgres. This reverts commit 8126a4f.