简体   繁体   中英

PostgreSQL multiple transactions on the same connection

Does PostgreSQL support multiple transactions on the same connection? I don't mean nested transactions, but unrelated different transactions.

If you mean "interleaved transactions" as required by the Java JTA standard: No, there is no support for that. See this JDBC FAQ section for this and why it is not a big loss.

Also the PostgreSQL core does not support something like this.

If with unrelated you mean one after the other, then the answer is yes.

If you mean having different transactions open at the same time, then the answer is no (there are some hacks available using dblink but I don't think they qualify as "on the same connection).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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