12

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

2
  • 2
    Multiple concurrent transactions on the same connection? No. Commented Jul 24, 2012 at 0:24
  • similar question. Does PostgreSQL support the execution of multiple queries within a single database connection? Commented Mar 7, 2024 at 1:05

2 Answers 2

9

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.

Sign up to request clarification or add additional context in comments.

1 Comment

The link is not working.
8

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).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.