https://bugs.openldap.org/show_bug.cgi?id=9011
--- Comment #4 from code@doriantaylor.com --- I was trying to determine why I got a notification for this bug, and I see now that it was because I filed a later one which was marked duplicate.
Indeed, my remarks on issue 9188 constitute why a language binding would need to know if a transaction was read-only. In the Ruby bindings for LMDB which I now maintain, it's easy to find situations like
db.transaction(true, &proc) # `true` enables read-only
...where `proc` itself does another transaction. I have semi-fixed this so read-only transactions "nest" by making the call a no-op if a transaction is already active, but it's still possible for read-write transactions to find their way inside read-only ones. So being able to create a `txn.readonly?` predicate would be useful for programmers downstream to better orient themselves.