Re: Use generation context to speed up tuplesorts
Tomas Vondra <tomas.vondra@enterprisedb.com>
From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>, David Rowley <dgrowleyml@gmail.com>,
Tomas Vondra <tv@fuzzy.cz>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-31T02:34:04Z
Lists: pgsql-hackers
Attachments
- 0001-Generation-grow-blocks.patch (text/x-patch)
Hi, I spent a bit of time hacking on the Generation context, adding the two improvements discussed in this thread: 1) internal handling of block sizes, similar to what AllocSet does (it pretty much just copies parts of it) 2) keeper block (we keep one empry block instead of freeing it) 3) I've also added allocChunkLimit, which makes it look a bit more like AllocSet (instead of using just blockSize/8, which does not work too well with dynamic blockSize) I haven't done any extensive tests on it, but it does pass check-world with asserts etc. I haven't touched the comments, those need updating. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Use Generation memory contexts to store tuples in sorts
- 40af10b571bd 15.0 landed
-
Adjust tuplesort API to have bitwise option flags
- 77bae396df3f 15.0 landed
-
Improve the generation memory allocator
- 1b0d9aa4f728 15.0 landed