[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: (ITS#8505) LMDB vs. fork()

I think your proposal is going beyond what I was trying to do.

>From the documentation, it sounds like a process using LMDB can not
safely fork, under any circumstances. My idea was to specialise this
to saying that fork() followed immediately by exec() is safe, but that
a plain fork() is still not supported. If a child wants to use the
same db, it goes through the regular mdb_env_open sequence, rather
than somehow inheriting the environment across the fork. I think that
should address your pthread_exit concern, as well?

On your point that a user may not call mdb_env_close before the fork:
the user might not want to, since s/he still wants to use the env in
the original process.