Permalink
Commits on Aug 17, 2012
  1. removed the useless http-cache related code from ngx_postgres_upstrea…

    …m_finalize_request to suppress clang warnings.
    agentzh committed Aug 17, 2012
  2. bugfix: the "open socket #n left in connection" alerts would appear i…

    …n the nginx error log file when the pg connection pool was used and the worker process was shutting down. this issue could be captured by running t/sanity.t with the environment TEST_NGINX_USE_HUP=1.
    agentzh committed Aug 17, 2012
Commits on Jun 21, 2012
  1. bugfix: memory leak might happen if nginx 1.1.14+ is used *and* (at l…

    …east) libpq fails to connect to the remote database.
    agentzh committed Jun 21, 2012
Commits on Jun 2, 2012
Commits on Jun 1, 2012
Commits on Apr 27, 2012
Commits on Apr 26, 2012
Commits on Feb 2, 2012
Commits on Dec 28, 2011
  1. Update CHANGES (releng for 0.9).

    Change-Id: I411c8bd5b24b8e5a4b7f26f84b8071ea02a16ccf
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 28, 2011
  2. Update nginx compatibility list.

    Change-Id: I57ad737fc66ae7a7f76e678d1012fc8d0921a74e
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 28, 2011
Commits on Dec 27, 2011
  1. Remove trailing whitespaces.

    Change-Id: I4c63b363cc922521eb2e48e93d1db0a4e4c0f105
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 27, 2011
  2. Add nginx-style debug logging.

    Based on patch from Yichun Zhang (agentzh).
    
    Change-Id: If2094a3a300500b1a6710e59d148e83abf3b6da4
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 27, 2011
Commits on Dec 23, 2011
  1. Make sure that the write event really occured before re-polling.

    The "re-polling" hack to work-around the case in which both:
    read and write events occured within the same event processing
    call was being used for any CONNECTION_MADE status, without
    checking if the write really occured.
    
    Based on patch from Yichun Zhang (agentzh).
    
    Change-Id: Ia8310a109baf639d1c5c3c766d2298c3610e6d47
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 23, 2011
  2. Fix compatibility with poll, select and /dev/poll event models.

    Reported by Yichun Zhang (agentzh).
    
    Change-Id: I9411e72ccfdbb0d974a92b6cba569dc15254ed3d
    Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
    PiotrSikora committed Dec 23, 2011
Commits on Nov 10, 2011
  1. Fix compatibility with PostgreSQL 9.x: bytea output.

    The issue that hit many (most?) of PostgreSQL adapters is that libpq-8.x
    is unable to unescape bytea data from results in text format received
    from PostgreSQL-9.x.
    
    But we're always passing bytea data as is to the client (either from
    results in binary format when using "postgres_output binary_value"
    or escaped from results in text format), so this isn't problem for us.
    
    Patch from Yichun Zhang (agentzh).
    PiotrSikora committed Nov 10, 2011
  2. Fix compatibility with PostgreSQL 9.x: rows affected.

    Starting with PostgreSQL 9.0, libpq's PQcmdTuples() returns row count
    for SELECT queries (previously it returned empty string).
    
    Because we're using this value to detect number of changed rows,
    both: "postgres_rewrite" directive and "$postgres_affected" variable
    were working incorrectly.
    
    Reported by Yichun Zhang (agentzh).
    PiotrSikora committed Nov 10, 2011
  3. bugfix: now we log an error message when the postgres_pass target is …

    …not found at all and returns 500 in this case instead of returning empty response.
    agentzh committed with PiotrSikora Nov 4, 2011
  4. Allow global definition of DDEBUG.

    From Yichun Zhang (agentzh).
    PiotrSikora committed Nov 10, 2011
  5. Fix compatibility with nginx-1.1.4+.

    Partly from Yichun Zhang (agentzh).
    PiotrSikora committed Nov 10, 2011
Commits on Jul 13, 2011
  1. fixed an issue regarding defining global variables in C header files:…

    … we should have defined rds_rough_col_type_t as a type rather than a global variable. thanks @姜大炮.
    agentzh committed Jul 13, 2011
Commits on Jun 21, 2011
  1. Always return first (and only) value for "postgres_output value".

    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.
    PiotrSikora committed Jun 21, 2011
  2. Replace "postgres_output row <row>" with "postgres_output text".

    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.
    PiotrSikora committed Jun 21, 2011
Commits on Jun 17, 2011
  1. Improve library discovery process by using PostgreSQL's pg_config.

    Based on patch from Silly Sad.
    PiotrSikora committed Jun 17, 2011
  2. Don't set last_buf=1 (duplicated last chunk issue).

    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.
    PiotrSikora committed Jun 17, 2011
Commits on May 11, 2011
  1. updated .gitignore a bit.

    agentzh committed May 11, 2011
Commits on Feb 18, 2011
  1. removed the hand-written << "in upstream \"t.shV\"", &pgdt->name >> p…

    …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.
    agentzh committed Feb 18, 2011
  2. fixed a bug in the connection pool: we should copy over the "name" an…

    …d "sockaddr" fields instead of passing pointers around.
    agentzh committed Feb 18, 2011
Commits on Feb 17, 2011
  1. fixed a minor bug in the connection pool: we should resume the "name"…

    …, "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.
    agentzh committed Feb 17, 2011
Commits on Jan 13, 2011
  1. Use PQescapeLiteral() to detect PostgreSQL 9.0.

    Calling PQconnectStartParams(NULL, *, *) results in SIGSEGV.
    PiotrSikora committed Jan 13, 2011