I've come up with a patch designed to improve performance for the case where Postgres has one or more overflowed subtransactions, i.e. at least one open transaction has >64 subtransactions. So far, performance results are very promising, which shows a loss of performance of x8-9 unpatched and almost fully restored performance in the patched version, for a test case of overflowed subxacts with data contention, in the presence of a long running transaction. [Image attached] To be accepted into PG16, we think it's a good idea to gather wide performance results. If you use subtransactions in your application, could you help characterize the performance of this patch? Sorry, no binaries available, just the patch. https://www.postgresql.org/message-id/attachment/140021/002_minimize_calls_to_SubTransSetParent.v12.patch Any test case is OK, as long as you publish the code to run it and publish the measurements with/without the patch. Thanks very much. -- Simon Riggs http://www.EnterpriseDB.com/
Attachment:
002_minimize_calls_to_SubTransSetParent.v12.perf_graphic.png
Description: PNG image