Postgres SQL version 11 is not working on Confluence 7.16

Hi everyone, Confluence 7.16 is available now and our team has found an issue about Postgres SQL of version 11 is not working on Confluence 7.16. The issue is about when our app created content(page) in Confluence and fire the chain of extractors to update its search index, an error pops up in the log:

logThrowable Unable to access module of type 'com.adaptavist.confluence.forums.service.extractors.ActivityScoreForumExtractor' in descriptor 'com.adaptavist.confluence.forums:com.adaptavist.confluence.forums.service.extractors.ActivityScoreForumExtractor' of class 'com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor' because of 'com.atlassian.activeobjects.internal.ActiveObjectsSqlException - There was a SQL exception thrown by the Active Objects library:
Database:
	- name:PostgreSQL
	- version:11.15
	- minor version:15
	- major version:11
Driver:
	- name:PostgreSQL JDBC Driver
	- version:42.2.18

org.postgresql.util.PSQLException: ERROR: cannot execute nextval() in a read-only transaction'.  Continuing...

It looks like the extractor is not working because there is an exception and the code is called from a read-only transaction. With this error, the page created by our app is not visible. We don’t have any code calling a database operation, so I believe this might be related to the plugin library itself, MySQL and H2 is working.

This problem was got us stuck for a couple of days and we ran out of ideas. Any help or advice would be appreciated!

Complete log:

2022-03-04 15:47:35,889 WARN [Caesium-1-4] [forums.service.extractors.ActivityScoreForumExtractor] logThrowable Unable to access module of type 'com.adaptavist.confluence.forums.service.extractors.ActivityScoreForumExtractor' in descriptor 'com.adaptavist.confluence.forums:com.adaptavist.confluence.forums.service.extractors.ActivityScoreForumExtractor' of class 'com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor' because of 'com.atlassian.activeobjects.internal.ActiveObjectsSqlException - There was a SQL exception thrown by the Active Objects library:
Database:
	- name:PostgreSQL
	- version:11.15
	- minor version:15
	- major version:11
Driver:
	- name:PostgreSQL JDBC Driver
	- version:42.2.18

org.postgresql.util.PSQLException: ERROR: cannot execute nextval() in a read-only transaction'.  Continuing...
2022-03-04 15:47:35,891 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,891 WARN [Caesium-1-4] [forums.service.extractors.TopicForumExtractor] logThrowable Unable to access module of type 'com.adaptavist.confluence.forums.service.extractors.TopicForumExtractor' in descriptor 'com.adaptavist.confluence.forums:com.adaptavist.confluence.forums.service.extractors.TopicForumExtractor' of class 'com.atlassian.confluence.plugin.descriptor.ExtractorModuleDescriptor' because of 'org.springframework.orm.hibernate5.HibernateJdbcException - JDBC exception on Hibernate data access: SQLException for SQL [n/a]; SQL state [25P02]; error code [0]; could not extract ResultSet; nested exception is org.hibernate.exception.GenericJDBCException: could not extract ResultSet'.  Continuing...
2022-03-04 15:47:35,893 WARN [Caesium-1-4] [hql.internal.ast.QueryTranslatorImpl] list HHH000104: firstResult/maxResults specified with collection fetch; applying in memory!
2022-03-04 15:47:35,893 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,894 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,895 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,896 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,898 ERROR [Caesium-1-4] [engine.jdbc.spi.SqlExceptionHelper] logExceptions ERROR: current transaction is aborted, commands ignored until end of transaction block
2022-03-04 15:47:35,907 WARN [Caesium-1-4] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
  ->[com.atlassian.confluence.search.lucene.LuceneIncrementalIndexManager.flushQueue]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly (Session #1927205557)
2022-03-04 15:47:35,908 WARN [Caesium-1-4] [confluence.impl.search.IndexFlushScheduler] lambda$new$1 Failed to flush index queue LuceneContentIndexFlusher, retry in 10s
org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processRollback(AbstractPlatformTransactionManager.java:870)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:707)
	at sun.reflect.GeneratedMethodAccessor204.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
	at com.sun.proxy.$Proxy77.commit(Unknown Source)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:654)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:407)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:119)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
	at com.sun.proxy.$Proxy189.flushQueue(Unknown Source)
	at com.atlassian.confluence.impl.search.IndexFlushScheduler.lambda$new$1(IndexFlushScheduler.java:122)
	at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.doRunJob(JobRunnerWrapper.java:117)
	at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.lambda$runJob$0(JobRunnerWrapper.java:87)
	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContextInternal(VCacheRequestContextManager.java:84)
	at com.atlassian.confluence.impl.vcache.VCacheRequestContextManager.doInRequestContext(VCacheRequestContextManager.java:68)
	at com.atlassian.confluence.impl.schedule.caesium.JobRunnerWrapper.runJob(JobRunnerWrapper.java:87)
	at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:134)
	at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:106)
	at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:90)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.launchJob(CaesiumSchedulerService.java:435)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeLocalJob(CaesiumSchedulerService.java:402)
	at com.atlassian.scheduler.caesium.impl.CaesiumSchedulerService.executeQueuedJob(CaesiumSchedulerService.java:380)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeJob(SchedulerQueueWorker.java:66)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.executeNextJob(SchedulerQueueWorker.java:60)
	at com.atlassian.scheduler.caesium.impl.SchedulerQueueWorker.run(SchedulerQueueWorker.java:35)
	at java.lang.Thread.run(Thread.java:748)
2022-03-04 15:47:35,909 WARN [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job LuceneContentIndexFlusher#LuceneContentIndexFlusher completed unsuccessfully with response JobRunnerResponse[runOutcome=FAILED,message='UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only']