path: root/doc/gdbm.3
diff options
authorSergey Poznyakoff <gray@gnu.org>2021-03-21 13:34:16 +0200
committerSergey Poznyakoff <gray@gnu.org>2021-03-21 13:52:49 +0200
commitd3e279579685be6732b3f7980f0b6a66f7e2d394 (patch)
tree41bc61c15b5b70c6cdda1467ab9a66fe0b8e4d8d /doc/gdbm.3
parent35d78dd3c6f96904175a8d152828e4616e7fe6c7 (diff)
Enable automatic cache size by default.newcache
This provides for the optimal performance. Additional GDBM_XVERIFY flag can be used when opening the database to request extended database verification (entire avail stack will be checked). * src/bucket.c (cache_lookup): Handle cache_size == GDBM_CACHE_AUTO. (_gdbm_cache_init): Likewise. * src/gdbm.h.in (GDBM_XVERIFY): New flag to gdbm_open. (GDBM_CACHE_AUTO): New constant. Define error constants within enum. Fix definition of GDBM_BAD_HASH_ENTRY. * src/gdbmclose.c: Fix misleading comment. * src/gdbmconst.h: Define DEFAULT_CACHESIZE to be GDBM_CACHE_AUTO. * src/gdbmopen.c (gdbm_fd_open): Call gdbm_avail_verify if the GDBM_XVERIFY flag is set. * doc/gdbm.texi: Update. * doc/gdbm.3: Update.
Diffstat (limited to 'doc/gdbm.3')
1 files changed, 30 insertions, 10 deletions
diff --git a/doc/gdbm.3 b/doc/gdbm.3
index 6525112..cfef634 100644
--- a/doc/gdbm.3
+++ b/doc/gdbm.3
@@ -13,7 +13,7 @@
.\" You should have received a copy of the GNU General Public License
.\" along with GDBM. If not, see <http://www.gnu.org/licenses/>. */
-.TH GDBM 3 "January 27, 2020" "GDBM" "GDBM User Reference"
+.TH GDBM 3 "March 21, 2021" "GDBM" "GDBM User Reference"
GDBM \- The GNU database manager. Includes \fBdbm\fR and \fBndbm\fR
@@ -33,28 +33,35 @@ compatibility.
.BI "int gdbm_close (GDBM_FILE " dbf ");"
-.BI "int gdbm_store (GDBM_FILE " dbf ", datum " key ", datum " content ", int " flag );
+.BI "int gdbm_store (GDBM_FILE " dbf ", datum " key ", datum " content ", int " flag ");"
-.BI "datum gdbm_fetch (GDBM_FILE " dbf ", datum " key );
+.BI "datum gdbm_fetch (GDBM_FILE " dbf ", datum " key ");"
-.BI "int gdbm_delete (GDBM_FILE " dbf ", datum " key );
+.BI "int gdbm_delete (GDBM_FILE " dbf ", datum " key ");"
.BI "datum gdbm_firstkey (GDBM_FILE " dbf ");"
-.BI "datum gdbm_nextkey (GDBM_FILE " dbf ", datum " key );
+.BI "datum gdbm_nextkey (GDBM_FILE " dbf ", datum " key ");"
+.BI "int gdbm_recover (GDBM_FILE " dbf ", gdbm_recovery *" rcvr ", int" flags ");"
.BI "int gdbm_reorganize (GDBM_FILE " dbf ");"
.BI "int gdbm_sync (GDBM_FILE " dbf ");"
-.BI "int gdbm_exists (GDBM_FILE " dbf ", datum " key );
+.BI "int gdbm_exists (GDBM_FILE " dbf ", datum " key ");"
-.BI "const char *gdbm_strerror (gdbm_error " errno );
+.BI "const char *gdbm_strerror (gdbm_error " errno ");"
.BI "int gdbm_setopt (GDBM_FILE " dbf ", int " option ", int " value ", int " size );
.BI "int gdbm_fdesc (GDBM_FILE " dbf );
+.BI "int gdbm_count (GDBM_FILE " dbf ", gdbm_count_t *" pcount ");"
+.BI "int gdbm_bucket_count (GDBM_FILE " dbf ", size_t *" pcount ");"
+.BI "int gdbm_avail_verify (GDBM_FILE " dbf ");"
.SS DBM Compatibility routines:
@@ -161,6 +168,15 @@ Causes all database operations to be synchronized to the disk,
Prevents the library from performing any locking on the database file.
+Set the close-on-exec flag on the database file descriptor.
+Enable additional consistency checks. With this flag, eventual
+corruptions of the database are discovered when opening it, instead of
+when a corrupted structure is read during normal operation. However,
+on large databases, it can slow down the opening process.
The option
@@ -327,9 +343,13 @@ and \fIoption\fR specifies which option to set. The valid options are
-Set the size of the internal bucket cache. This option may only be set once
-on each \fIGDBM_FILE\fR descriptor, and is set automatically to 100 upon the
-first access to the database.
+Set the size of the internal bucket cache. By default, the cache size
+is selected to provide for the optimal performance. Use this option,
+if you wish to limit the memory usage at the expense of performance.
+Use the
+constant to return to the default.
Set \fBfast mode\fR to either on or off. This allows \fBfast mode\fR to

Return to:

Send suggestions and report system problems to the System administrator.