When investigation a performance issue on PostgreSQL, I found out from logs that transaction ID is always Zero, while virtual transaction ID is always defined, from PG docs zero in transaction id means there is no transaction, please how could this be explained, is it because the Prepared transactions feature is enabled?
I'm using max_prepared_transactions = 100
because I'm using a Wildfly server to create a xa-datasource to connect to the PG database, and the service that is executing the below queries is configured to be transactional, with transaction attribute @TransactionAttribute(TransactionAttributeType.REQUIRED)
These are the log configuration, and log samples:
log_line_prefix = '%m [%p] [%c] [%x] [%v] '