[bind10-dev] missing C API for PostgreSQL: row-by-row query result retrieval

JINMEI Tatuya / 神明達哉 jinmei at isc.org
Tue Oct 2 03:47:27 UTC 2012


While doing experiments I mentioned in the other thread(*), I noticed
that the PostgreSQL's C API misses one important feature except in the
very latest version, 9.2: the ability of incremental retrieving a
query result.
* https://lists.isc.org/pipermail/bind10-dev/2012-October/003866.html

It seems to be supported in 9.2
http://www.postgresql.org/docs/9.2/static/libpq-single-row-mode.html,
but before that it seems we have to store all results of a query in
memory at once and then process it.  It makes some usage effectively
unusable (or at least very expensive) such as axfr-out or loading from
DB in-memory for a very large zone.

If our next target for the DB backend is PostgreSQL, we need to think
about how to deal with that, including:

- Implement everything using pre-9.2 APIs, and say that it won't work
  well for large scale environments
- Support both the new and old APIs based on availability, and say
  that for large scale environments 9.2 or higher will have to be
  used.

By the way, MySQL's C API has been supporting incremental retrieval
for quite some time, so we don't have this particular issue with
MySQL.

---
JINMEI, Tatuya


More information about the bind10-dev mailing list