While working on adding info on Berkeley DB to the Guide, I came across
this statement:
"If you need to access a dbm file in your mod_perl code in the read only
mode the operation would be much faster if you keep the dbm file open
(tied) all the time and therefore ready to be used. This will work with
dynamic (read/write) databases accesses as well, but you need to use
locking and data flushing to avoid data corruption."
Is anyone aware of a safe to way to do multi-process read/write access
through a dbm module other than BerkeleyDB.pm without tie-ing and
untie-ing every time? I thought that was the only safe thing to do
because of buffering issues, but this seems to be implying that careful
use of sync calls or something similar would do the trick. Maybe this is
just left over from before the problem with the old technique described in
the DB_File docs was discovered? Any comments?
- Perrin