From: | Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com> |
---|---|
To: | Jeff Davis <pgsql(at)j-davis(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Trouble with hashagg spill I/O pattern and costing |
Date: | 2020-05-21 21:02:32 |
Message-ID: | 20200521210232.fw5mazn23eftho7y@development |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, May 21, 2020 at 12:40:23PM -0700, Jeff Davis wrote:
>On Thu, 2020-05-21 at 21:13 +0200, Tomas Vondra wrote:
>> 1) Instead of assigning the pages one by one, we can easily extend
>> the
>> API to allow getting a range of blocks, so that we don't need to call
>> ltsGetFreeBlock in a loop. Instead we could call ltsGetFreeBlockRange
>> with the requested number of blocks.
>
>ltsGetFreeBlock() just draws one element from a minheap. Is there some
>more efficient way to get many elements from a minheap at once?
>
>> And we could keep just a min/max
>> of free blocks, not an array with fixed number of elements.
>
>I don't quite know what you mean. Can you elaborate?
>
Ah, I forgot there's and internal minheap thing - I thought we're just
incrementing some internal counter or something like that, but with the
minheap we can't just get a range of blocks. So just disregard that,
you're right we need the array.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2020-05-21 21:16:37 | Re: Trouble with hashagg spill I/O pattern and costing |
Previous Message | David Rowley | 2020-05-21 20:51:45 | Re: [PATCH] Keeps tracking the uniqueness with UniqueKey |