org.postgresql.util。PSQLException:错误:达到的已准备事务的最大数量。

时间:2021-08-23 01:25:45

Helo guys,

直升机的家伙,

I have an error when I try to navigate on a page. The error's hint: "Increase max_prepared_transactions (currently 1)".

当我试图在页面上导航时,我有一个错误。错误提示:“增加max_prepared_transactions(当前为1)”。

    WARN  [com.arjuna.ats.jta] (default task-8) ARJUNA016041: prepare on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a80471:3a3e542a:57835324:1858, node_name=1, branch_uid=0:ffffc0a80471:3a3e542a:57835324:185e, subordinatenodename=null, eis_name=java:/jdbc/referenceData > (XAResourceWrapperImpl@56b51930[xaResource=org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@450e867b pad=false overrideRmValue=null productName=PostgreSQL productVersion=9.5.2 jndiName=java:/jdbc/referenceData]) failed with exception XAException.XAER_RMERR: org.postgresql.xa.PGXAException: Error preparing transaction
    at org.postgresql.xa.PGXAConnection.prepare(PGXAConnection.java:334)
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.prepare(XAManagedConnection.java:330)
    at org.jboss.jca.core.tx.jbossts.XAResourceWrapperImpl.prepare(XAResourceWrapperImpl.java:177)
    at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelPrepare(XAResourceRecord.java:210)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2586)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.doPrepare(BasicAction.java:2536)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.prepare(BasicAction.java:2097)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1481)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96)
    at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1166)
    at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
    at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
    at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:173)
    at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1021) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:485) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) [spring-tx-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655) [spring-aop-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at ro.digidata.socd.service.impl.GeprodromIntegrationBean$$EnhancerBySpringCGLIB$$d1fb6ba0.getCountyName(<generated>) [classes:]
    at ro.digidata.socd.portal.jsf.mbeans.users.UsersMB.initUserDetailsPage(UsersMB.java:468) [classes:]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_77]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_77]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_77]
    at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_77]
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329) [jboss-el-2.0.1.GA.jar:]
    at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274) [jboss-el-2.0.1.GA.jar:]
    at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59) [jboss-el-2.0.1.GA.jar:]
    at org.jboss.el.parser.AstValue.getValue(AstValue.java:67) [jboss-el-2.0.1.GA.jar:]
    at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186) [jboss-el-2.0.1.GA.jar:]
    at org.jboss.weld.el.WeldValueExpression.getValue(WeldValueExpression.java:50) [weld-core-impl-2.2.6.Final.jar:2014-10-03 10:05]
    at com.sun.faces.facelets.el.ELText$ELTextVariable.writeText(ELText.java:238) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.facelets.el.ELText$ELTextComposite.writeText(ELText.java:154) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.facelets.compiler.TextInstruction.write(TextInstruction.java:85) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:456) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:133) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at org.apache.myfaces.tomahawk.application.ResourceViewHandlerWrapper.renderView(ResourceViewHandlerWrapper.java:169) [tomahawk21-1.1.14.jar:1.1.14]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:337) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) [jsf-impl-2.2.8-jbossorg-1.jar:]
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) [jboss-jsf-api_2.2_spec-2.2.8.jar:2.2.8]
    at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:130) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:100) [primefaces-5.3.jar:5.3]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at ro.digidata.socd.portal.filters.ExceptionFilter.doFilter(ExceptionFilter.java:55) [classes:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at ro.digidata.socd.portal.filters.DataCollectionEditFilter.doFilter(DataCollectionEditFilter.java:47) [classes:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:316) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:126) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:90) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:122) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:168) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:48) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:205) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:116) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:120) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:53) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:133) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:91) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:213) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:176) [spring-security-web-4.0.1.RELEASE.jar:4.0.1.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262) [spring-web-4.2.4.RELEASE.jar:4.2.4.RELEASE]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at ro.digidata.socd.portal.filters.ProcessingTimeFilter.doFilter(ProcessingTimeFilter.java:65) [classes:]
    at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:60) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:132) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:85) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:63) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.jrHandle(ServletInitialHandler.java) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at org.zeroturnaround.javarebel.integration.servlet.undertow.cbp.ServletInitialHandlerCBP.handleRequest(ServletInitialHandlerCBP.java:100) [undertow-servlet-jr-plugin-6.4.3.jar:]
    at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:261) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:247) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:76) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:166) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.Connectors.executeRootHandler(Connectors.java:197) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:759) [undertow-core-1.1.0.Final.jar:1.1.0.Final]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_77]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_77]
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_77]
Caused by: org.postgresql.util.PSQLException: ERROR: maximum number of prepared transactions reached
  Hint: Increase max_prepared_transactions (currently 1).
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
    at org.postgresql.jdbc.PgStatement.executeWithFlags(PgStatement.java:321)
    at org.postgresql.jdbc.PgStatement.executeUpdate(PgStatement.java:297)
    at org.postgresql.xa.PGXAConnection.prepare(PGXAConnection.java:326)
    ... 128 more
  • Installed I have pgAdMIn III version 1.22
  • 安装了pgAdMIn III版本1.22。
  • On server have postgresql 9.4: D:\install\wildfly-8.2.0.Final\modules\org\postgresql\main\postgresql-9.4.1208.jar
  • 在服务器上有postgresql 9.4: D:\install\ wildfli8.2.0.final \modules\org\postgresql\ postgresql-9.4.1208.jar。
  • On pgAdmin I have PostgreSQL 9.5.2 as shown below:
  • 在pgAdmin上,我使用了PostgreSQL 9.5.2,如下所示:

org.postgresql.util。PSQLException:错误:达到的已准备事务的最大数量。

In order to solve the problem I am trying to increase the max_prepared_transactions as the hint says:

为了解决这个问题,我正在尝试增加max_prepared_transactions,提示如下:

1) In the pgAdmin client Tools> Server Configuration > postgresql.conf I have set the max_prepared_tranzaction to 10 org.postgresql.util。PSQLException:错误:达到的已准备事务的最大数量。

1)在pgAdmin客户端工具>服务器配置> postgresql。我已经将max_prepared_tranzaction设置为10。

then I tryed to restart the server by making these steps:

然后,我尝试通过以下步骤重新启动服务器:

  • Tools> Server Configuration > postgresql.conf > File > Reload server and also I tried
  • 工具>服务器配置> postgresql。conf >文件>重载服务器,我也试过了。
  • pgAdmin III > File > Reload Configuration
  • pgAdmin III >文件>重新加载配置。

2) In C:\Program Files (x86)\pgAdmin III\1.22\i18n\pg_settings.csv I see this: org.postgresql.util。PSQLException:错误:达到的已准备事务的最大数量。

2)在c:)我看到这个csv:

but I don't know if it is good for edit.

但我不知道它是否适合编辑。

After these steps the error persists.

在这些步骤之后,错误仍然存在。

Then I tried to find postfresql.config and I have executed the query that you can see below: org.postgresql.util。PSQLException:错误:达到的已准备事务的最大数量。

然后我试图找到postfresql。配置和我执行的查询,您可以看到如下:

but I could not find the file (as you can see in the photo above).

但是我找不到这个文件(如上图所示)。

Could someone give me an solution to resolve the error? I think the parameter max_prepared_transaction should be increased, but I can't find tha postgresql.config file.

有人能给我一个解决方案吗?我认为应该增加参数max_prepared_transaction,但是我找不到postgresql。配置文件。

2 个解决方案

#1


1  

You need a server restart after you change max_prepared_transactions, see the documentation.

在更改max_prepared_transactions后,需要重新启动服务器,请参阅文档。

A reload is not enough.

重新加载是不够的。

You won't be able to do this with pgAdmin III.

你不能用pgAdmin III来做这个。

#2


1  

To answer to your questions,

为了回答你的问题,

  1. You need to increase the number of max_prepared_transactions from 1 to whichever number you feel suits your requirement (but a number lesser than 100 is suggested). The change in configuration will take affect only after a server restart as @Laurenz Albe suggested!

    您需要将max_prepared_transactions的数量从1增加到您认为符合您要求的任意数量(但建议小于100的数字)。配置的更改将仅在服务器重新启动后才生效,如@Laurenz Albe建议!

  2. You'll have to search for a file named postgresql.conf instead of postgresql.config (which is wrong and you'll never find this file on your configured PostgreSQL server), which is generally found under the /data folder of your PostgreSQL installation (and exactly the folder structure that you've shared in your question's screenshot earlier)!

    您必须搜索名为postgresql的文件。conf代替postgresql。config(这是错误的,你永远不会在你配置的PostgreSQL服务器上找到这个文件),它通常是在PostgreSQL安装的/data文件夹下找到的(以及之前在你的问题截图*享的文件夹结构)!

Hope this helps!

希望这可以帮助!

#1


1  

You need a server restart after you change max_prepared_transactions, see the documentation.

在更改max_prepared_transactions后,需要重新启动服务器,请参阅文档。

A reload is not enough.

重新加载是不够的。

You won't be able to do this with pgAdmin III.

你不能用pgAdmin III来做这个。

#2


1  

To answer to your questions,

为了回答你的问题,

  1. You need to increase the number of max_prepared_transactions from 1 to whichever number you feel suits your requirement (but a number lesser than 100 is suggested). The change in configuration will take affect only after a server restart as @Laurenz Albe suggested!

    您需要将max_prepared_transactions的数量从1增加到您认为符合您要求的任意数量(但建议小于100的数字)。配置的更改将仅在服务器重新启动后才生效,如@Laurenz Albe建议!

  2. You'll have to search for a file named postgresql.conf instead of postgresql.config (which is wrong and you'll never find this file on your configured PostgreSQL server), which is generally found under the /data folder of your PostgreSQL installation (and exactly the folder structure that you've shared in your question's screenshot earlier)!

    您必须搜索名为postgresql的文件。conf代替postgresql。config(这是错误的,你永远不会在你配置的PostgreSQL服务器上找到这个文件),它通常是在PostgreSQL安装的/data文件夹下找到的(以及之前在你的问题截图*享的文件夹结构)!

Hope this helps!

希望这可以帮助!