As a database developer, you want these sub-transactions or autonomous transactions to be processed and committed regardless of what happens to the larger surrounding transaction block.
The pg_background Postgres extension originally written by Robert Haas starts a separate worker to process a SQL statement, which is a nice way to achieve an autonomous transaction.
When using spring and spring managed transactions never mess around with the hibernate.current_session_context_class property UNLESS you are using JTA.