From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: Trouble with hashagg spill I/O pattern and costing
Date: Thu, 21 May 2020 23:02:32 +0200
Message-ID: <20200521210232.fw5mazn23eftho7y@development> (raw)
In-Reply-To: <c4baae3f14a809cdea5a0d04d07d447124fa0caf.camel@j-davis.com>
References: <20200519151202.u2p2gpiawoaznsv2@development>
<88dd39d782178539d7ee46f98b98579940e2a12e.camel@j-davis.com>
<20200519175320.tl4qm6le5dbg2pcf@development>
<acad6f2ba8d560b9dfa9a564c7b7d3162abf8347.camel@j-davis.com>
<20200521191318.gw3xjivrxracvzmg@development>
<c4baae3f14a809cdea5a0d04d07d447124fa0caf.camel@j-davis.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, pgsql@j-davis.com
Subject: Re: Trouble with hashagg spill I/O pattern and costing
In-Reply-To: <20200521210232.fw5mazn23eftho7y@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox