https://bugs.openldap.org/show_bug.cgi?id=9208
Bug ID: 9208 Summary: LMDB feature request: variant of mdb_env_copy{,fd2} that takes transaction as parameter Product: LMDB Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Severity: normal Priority: --- Component: liblmdb Assignee: bugs@openldap.org Reporter: github@nicwatson.org Target Milestone: ---
The mdb_env_copy* functions create a read transaction themselves to run the backup on. New variants of these functions (one for mdb_env_copy2 and one for mdb_env_copyfd2) would have a transaction parameter. This transaction would be used instead of creating a new transaction.
Application code could use these new functions to synchronize consistent live backups across multiple LMDB instances (potentially across multiple hosts).
https://bugs.openldap.org/show_bug.cgi?id=9208
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |WONTFIX Severity|normal |enhancement Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Howard Chu hyc@openldap.org --- Unfortunately that can't be done, because the readtxn that these copy functions use has to be mangled a bit in order to get a safe snapshot. If a caller provided their own readtxn, especially in order to coordinate with other operations, the readtxn would be left in a state completely different from what the caller expected, and synchronization would be broken anyway.