| From: | Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com> | 
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de>, David Rowley <dgrowleyml(at)gmail(dot)com>, Tomas Vondra <tv(at)fuzzy(dot)cz> | 
| Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> | 
| Subject: | Re: Use generation context to speed up tuplesorts | 
| Date: | 2021-07-31 02:34:04 | 
| Message-ID: | d987fd54-01f8-0f73-af6c-519f799a0ab8@enterprisedb.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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
| Attachment | Content-Type | Size | 
|---|---|---|
| 0001-Generation-grow-blocks.patch | text/x-patch | 6.1 KB | 
| 0002-Generation-keeper-block.patch | text/x-patch | 4.4 KB | 
| 0003-Generation-allocChunkLimit.patch | text/x-patch | 2.2 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2021-07-31 03:17:49 | Re: archive status ".ready" files may be created too early | 
| Previous Message | Tom Lane | 2021-07-31 01:17:59 | Re: Asynchronous and "direct" IO support for PostgreSQL. |