简体   繁体   English

从会话外部提交事务

[英]Commit transaction from outside the session

Is there any function in postgres that could commit hanging transaction in another session? postgres中是否有任何功能可以在另一个会话中提交挂起事务? For instance somebody startet session and began transaction then forgotten about commit and I would like to commit this transaction from my session. 例如,某人开始会话并开始事务,然后忘记了提交,我想从会话中提交此事务。

No, you can't do that in PostreSQL or any other RDBMS for that matter. 不,您不能在PostreSQL或任何其他RDBMS中做到这一点。 If you have DBA access to your database, you could kill the session whose commit has not been made (and the transaction will be rollbacked). 如果您具有数据库的DBA访问权限,则可以杀死尚未提交的会话(事务将回滚)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM