Re: SUBTRANS: Minimizing calls to SubTransSetParent()
Simon Riggs <simon.riggs@enterprisedb.com>
From: Simon Riggs <simon.riggs@enterprisedb.com>
To: Dilip Kumar <dilipbalaut@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2022-08-30T16:45:54Z
Lists: pgsql-hackers
Attachments
- 002_minimize_calls_to_SubTransSetParent.v8.patch (application/octet-stream) patch v8
- 001_new_isolation_tests_for_subxids.v3.patch (application/octet-stream) patch v3
On Thu, 11 Aug 2022 at 06:32, Dilip Kumar <dilipbalaut@gmail.com> wrote: > > > So I still think some adjustment is required in XidInMVCCSnapdhot() > > > > That is one way to resolve the issue, but not the only one. I can also > > change AssignTransactionId() to recursively register parent xids for > > all of a subxid's parents. > > > > I will add in a test case and resolve the dependency in my next patch. > > Okay, thanks, I will look into the updated patch after you submit that. PFA two patches, replacing earlier work 001_new_isolation_tests_for_subxids.v3.patch 002_minimize_calls_to_SubTransSetParent.v8.patch 001_new_isolation_tests_for_subxids.v3.patch Adds new test cases to master without adding any new code, specifically addressing the two areas of code that are not tested by existing tests. This gives us a baseline from which we can do test driven development. I'm hoping this can be reviewed and committed fairly smoothly. 002_minimize_calls_to_SubTransSetParent.v8.patch Reduces the number of calls to subtrans below 1% for the first 64 subxids, so overall will substantially reduce subtrans contention on master for the typical case, as well as smoothing the overflow case. Some discussion needed on this; there are various options. This combines the work originally posted here with another patch posted on the thread "Smoothing the subtrans performance catastrophe". I will do some performance testing also, but more welcome. -- Simon Riggs http://www.EnterpriseDB.com/
Commits
-
Used optimized linear search in more code paths
- 14ff44f80c09 16.0 cited
-
Add subxid-overflow "isolation" test
- 0e733278e346 16.0 landed