On Fri, May 2, 2014 at 1:27 AM, LEVAI Daniel <l...@ecentrum.hu> wrote:

> I've recently upgraded one of my systems to 55 from 54 (btw, for me, the
> most painful upgrade since ~3.9; I don't know what happened but
> everything was against me), and one of the obstacles was the openldap
> upgrade. I was using openldap-2.4 with bdb on 5.4 also, so I thought it
> would be a clean cut. After trying to start slapd, it barked about the
> bdb's consistency:
>
> __db.001: unable to find environment
> txn_checkpoint interface requires an environment configured for the
> transaction subsystem
> ... etc ... (the precise error message would require the restore of the
> old db files, but what's important is there)
>

Ah yes.  The __db.0* 'environment' files are just the backing-store for the
shared memory images.  As a result, their internal layouts are dependent on
the sizes of many system types, as well as on bdb's compile time debugging
flags.  As a result, they can be removed without loss of data whenever the
database isn't open in any process.  If closed cleanly, then it can be
opened again without having to perform recovery, though many application
just always perform recovery on the first open, to make sure.  (So
performing transaction checkpoints regularly and just before closing is
good.)

So: when upgrading, you should be removing the __db.* files for openldap.

(That's *not* the case with the actual database file formats (btree, hash,
queue, recno): those use fixed-size types internally.  On the gripping
hand, the actual data that the application is storing in the databases'
keys and values *may* be dependent on the system types!)


Philip Guenther

Reply via email to