DB->compact API Ref

#include <db.h>

int DB->compact(DB *db, DB_TXN *txnid, DBT *start, DBT *stop, DB_COMPACT *c_data, u_int32_t flags, DBT *end);


Description: DB->compact

The DB->compact method compacts Btree and Recno access method databases, and optionally returns unused Btree, Hash or Recno database pages to the underlying filesystem.

The DB->compact method returns a non-zero error value on failure and 0 on success.

Parameters
txnid start stop c_data flags end

Errors

The DB->compact method may fail and return one of the following non-zero errors:


DB_LOCK_DEADLOCK DB_LOCK_NOTGRANTED

DB_REP_HANDLE_DEAD

DB_REP_LOCKOUT

EACCES

EINVAL


Class DB
See Also Databases and Related Methods

APIRef

Copyright (c) 1996,2008 Oracle. All rights reserved.