I am using Axon framework latest version (4.5.9) using Axon Server and Postgres. Spring Data/JPA is used to create the Axon tables tokenentry, sagaentry and associationvalueentry in the database. All projections are store in the database, the system runs fine so far.
Now I discovered that there are a lot of orphaned large objects in the Postgres database and it looks like these orphaned large objects are primarily caused by Axon’s tokenentry and sagaentry tables. Both tokenentry and sagaentry use @Lob annotation and this creates large objects in Postgres. I also learned that Postgres does not automatically remove referenced large object entries from Postgres’ internal pg_largeobject table (PostgreSQL: Documentation: 14: F.20. lo).
I can cleanup those orphaned large objects using the Postgres tool vacuumlo (PostgreSQL: Documentation: 14: vacuumlo) but this feels just like a workaround.
Are there any recommendations or experiences how to deal with this issue?