Re: [exim] Tools for SQL export to CDB

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Metheringham
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] Tools for SQL export to CDB
On Mon, 2006-04-17 at 11:54 +0100, Peter Bowyer wrote:
> On 17/04/06, David Saez Padros <david@???> wrote:
> > the best option is just open a pipe to cdbmake and pass the ascii data
> > to it ( see http://cr.yp.to/cdb/cdbmake.html ), you will have to
> > recreate the whole table every time. As far as i know is not
> > a good idea to modify the structure of an already created cdb database
> > as (your have the specs at http://cr.yp.to/cdb/cdb.txt )
>
> Indeed it's not - if you need to update, use some form of dbm instead.
> cdb is optimised for write-once, lookup-many - and cdbmake provides
> atomic rebuilds.


Long ago, the Freeserve system used to use a daily build of a cdb file
for authentication because it was blindingly fast. However we needed to
be able to add/change users etc so there was a second level dbm lookup
used if the cdb lookup failed (the gdbm file, with locking, was roughly
a factor of 10 slower than CDB) - this was updated on the fly from the
main database (I was, and still am, keen on semi-autonomous systems
where service can continue even in the face of a major failure of the
central database). Of course user updates gave us a little bit of a
problem... easily fixed by nulling out changed users from the cdb
tables.

And so I claim the prize for strangest abuse of cdb files :-)

    Nigel.
-- 
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]