Could you genericise the requirement in postgresql and provide a storage interface we could plug into? I think I have a use for this in Polykey (https://GitHub.com/MatrixAI/Polykey) but we use rocksdb (transactional key value embedded db).
That's definitely worth considering! The core algorithms can work with any data store. That said, we're focused on Postgres right now because of its incredible support and popularity.
You could imagine this working well for cloudflare workers - especially with time limits on execution. (Or with even aws compute market)
Also this reminds me of orthogonal persistence https://wiki.c2.com/?TransparentPersistence
Did you do literature research of Smalltalk?