Re: [Exim] Re: Persistent DB connections to MySQL database

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Philip Hazel
Ημερομηνία:  
Προς: Miquel van Smoorenburg
Υ/ο: exim-users
Αντικείμενο: Re: [Exim] Re: Persistent DB connections to MySQL database
On Thu, 16 May 2002, Miquel van Smoorenburg wrote:

> > > fly. What I would like to know is whether it would be safe to update the
> > > NDBM database used by Exim directly or whether I would need to lock it.


> - create it under a temporary name
> - mv it into place ("mv" uses rename(2) which is guaranteed atomic).


The problem with NDBM is that it uses *two* files, thus making it
impossible to do an atomic rename. Well, not impossible, just messier.
What you need to do is to put the two files into a directory, and rename
the directory.

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.