Vacuum a database
#include <qdb/qdb.h> int qdb_vacuum( qdb_hdt_t *db, int scope );
This function starts a vacuum operation on the specified database and any auto-attached databases, which are listed in the main database's .aa file. This is an alternative to using the VACUUM command for each database.
If the auto-vacuum flag is enabled, databases are vacuumed whenever free space is created, so you don't need to call qdb_vacuum() or run the VACUUM command. By default, the auto-vacuum flag is disabled; this is better for slower storage media because vacuuming can be costly.
You can call qdb_getdbsize() and examine the returned size to determine whether a database should be vacuumed.
QNX Neutrino
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | Yes |