Axon and Large Objects

Hey guys,

I’m testing out Axon with Postgres and it appears to leverage the Postgres Large Objects by default for its events and tokens. It appears that Postgres has disabled the access for large objects for non superuser accounts within Postgres 9.0. Now we’re currently using Postgres 9.6, and are seeing if there are workarounds for this.

I did some digging, and there is the lo_compat_privilege flag; however, that isn’t an option in our scenario to flip.

Thank You,
Tony Nguyen


There are a couple of threads in this mailing list on this subject already.

There is this blog post as well:


Hi Ivan,

We use the axon event store but currently the tokenstore is in mysql. We plan to move to postgres here.
The threads are for event + tokenstore…

In our case only the token store and the saga will be there.

Is there an updated/new documentation? The threads you linked ended with “is there a solution for Axon 4.2”

Best, Michael

Hi Michael,

we decided not to do any workarounds in Axon for this matter. This is a “problem” that sits between Hibernate and Postgres, and we feel that customizing the mapping or table structure specifically to a database is a better solution than to complicate Axon with all kinds of database-specific variations of defaults.


Hi Allard,

thanks for the feedback. So you say the is still working?
Because the listed thread sounds to me this is not the case for axon 4.2 anymore. So it has to be solved differently.

Best, Michael

The package names of the entries in the orm.xml file might have changed, but other than that, the approach should still work.