Interface Changes introduced in DB 2.1.0:

  1. We have added a compatibility API for DB 1.85. We had not intended to do this, however, versions of the GNU gcc compiler in beta release trigger problems in DB 1.85 (and in previous releases of DB 2.0.N), causing them to drop core. As we're unwilling to do further work on DB 1.85, we're adding in a compatibility mode to the current DB package instead.

    The DB 1.85 compatibility API is optional (so folks using both DB 1.85 and DB 2.N in a single library aren't surprised). To include it in the DB library, use the configuration option --enable-compat185. For consistency, the configuration option --enable-build185, previously found in DB 2.N releases, has been renamed to be --enable-dump185. See the file build.unix/README in the DB distribution for further information.

    We have also made other changes in the DB 2.1.0 release so that historic DB 1.85 applications will generally perform better using the current release than they do using the historic release.

    Please note that the underlying databases MUST still be converted from the historic format to the current format.

  2. We have changed the default behavior of db_appinit(3) so that it does NOT create the underlying shared memory regions by default. If the calling application wants to create these regions, it must now specify the DB_CREATE flag when calling db_appinit(3).

  3. Specifying transactions to the db_appinit(3) function now implies logging, that is, DB_INIT_TXN now implies DB_INIT_LOG.

  4. We have changed the memp_stat(3) interface. It previously took a pointer to a memory pool (DB_MPOOL *) and a file pointer (FILE *) and wrote memory pool statistics to the specified file pointer. The new version is:

    memp_stat(DB_MPOOL *, DB_MPOOL_STAT **, DB_MPOOL_FSTAT ***);

    and it returns memory pool statistics to the calling application, in two new structures. See the manual page db_mpool(3) in the DB distribution for more information. We expect to add similar statistical functions to the other DB subsystems in future releases.

    There is also a new utility, db_stat(1). This utility presents the statistics in human-readable form.

  5. We have added new functionality to the mpool interface. There's a new field, mp_mmapsize, in the DB_ENV structure, and a new flag to the memp_fopen(3) structure (DB_NOMMAP). These features provide a finer level of control over which files will be mapped into the process address space. See the manual page db_mpool(3) in the DB distribution for more information.

  6. Page-in and page-out functions specified for buffer pools must now return an errno value on failure and 0 on success, instead of the previous interface, which was non-zero on failure and 0 on success, setting errno. See the manual page db_mpool(3) in the DB distribution for more information.

  7. There are a couple of major performance improvements in the new DB release for small, non-persistent buffer pools, for example, applications using the traditional DB 1.85 interface or applications creating small, temporary databases. First, the shared memory regions are no longer fully populated on startup. Second, the backing file used for temporary buffer pools is no longer created until it is actually needed. These changes should cause no visible change for applications.