402f9bcf48cbccc17fdb5f3ea411a7967aed0fd0 |
|
17-Jul-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
lib-sql: Add API support for asynchronously iterating over rows.
sql_query() can already do an async lookup, but the full result needs
to be available immediately. This can be inefficient for large results.
Add a new SQL_RESULT_NEXT_MORE return value and sql_result_more() for
asynchronously requesting more results.
This changes the API a bit, but isn't done by default by any drivers yet.
Also callers that can't handle this are hopefully checking for "ret < 0",
which allows them to handle such an async-more request as an error
instead.
sql_result_next_row() will be changed to return enum in a separate commit to
keep backwards compatibility in v2.2.x. |
6b2738c39a868ff9291867138c55029fc40cf105 |
|
04-May-2010 |
Timo Sirainen <tss@iki.fi> |
lib-sql: Use generic sql connection pooling code for mysql/pgsql.
It's possible to give multiple host settings to do load balancing / HA.
If one host is down, another one is tried. All queries are automatically
retried in another host if they fail in first one.
Since PostgreSQL support async queries, Dovecot can create multiple
connections to the database as needed, so it can do lookups in parallel. The
number of connections can be changed with maxconns=n in connect_query, the
default is 5.
--HG--
branch : HEAD |