On 10/28/21 10:37, Bruce Momjian wrote: > I know of no plans to implement 64-bit transaction ids in community > Postgres because of the longer tuple header and file format changes. > It is discussed occasionally though.
Is there anything you can use a SubTransactionId for outside of C code? PL/Java interacts with these things through BeginInternalSubTransaction(), ReleaseCurrentSubTransaction(), or RollbackAndReleaseCurrentSubTransaction() in C. It also has been obeying the letter of the JDBC spec by implementing a method that can return it to the caller (as a Java 32-bit int, oops, so decreed by the spec). [0] But as I think about it, I am not sure there is anything interesting or useful a Java caller could do with a SubTransactionId anyway. I mean, does it even appear in a statistics view or SQL-exposed function anywhere? I see there is a top-level backend_xid in pg_stat_activity, but is there any exposure of SubTransactionIds anywhere? Everything you can do with a Savepoint in JDBC (release it or roll it back, what else is there?) is just a method on the Java object and you don't need to know its underlying id. Regards, -Chap [0] https://docs.oracle.com/en/java/javase/12/docs/api/java.sql/java/sql/Savepoint.html#method.detail