Subject: Berkely db question when running in ndbm compatibility mode
To: None <current-users@NetBSD.ORG>
From: Brian Buhrow <>
List: current-users
Date: 06/07/1997 22:57:50
	Hello Folks.  I apologize for being slightly off topic, but I thought
perhaps someone might be  able to shed light on what is going on.
	I'm writing an application which uses a number of simultaneous  db
databases.  During the course of using these databases, I find that I need
to walk through them using the dbm_firstkey and dbm_nextkey functions.
This works fine, until I need to update the very database I'mm walking
through.  At that point, the walk seems to grow drunken, with the dbm_nextkey
returning duplicate keys (I've been using the DBM_REPLACE flag when storing
data into these databases.) and skipping other keys entirely.
	I read the documentation, but could find any documentation which said
that it was not all right to access the database and change data in the
database while performing a walk through the database.  I might understand
how doing another walk through the same database when one is already
walking might be a problem, but I'm not doing that.  I am, however, adding,
moving and changing items in the same database I'm concurrently walking
through.  Is the behavior I'm seeing known?  If so, is there a package
which will allow me to add, move and change data elements in a database
while concurrently walking through?  Better yet, is there one with NDBM
If the behavior I'm describing sounds odd, does anyone have any thoughts on
what might be causing it if it's not the adds moves and changes?
-thanks in advance.