mdb_env_sync simply calls fsync (or equivalent) on the database file. It does not interact with transactions, and can be called concurrently with itself. When it returns, transactions completed before mdb_env_sync was started are persisted on the filesystem.