Re: Small improvement to compactify_tuples

Sokolov Yura <funny.falcon@postgrespro.ru>

From: Sokolov Yura <funny.falcon@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Heikki Linnakangas <hlinnaka@iki.fi>, pgsql-hackers@postgresql.org, Heikki Linnakangas <hlinnaka@gmail.com>, pgsql-hackers-owner@postgresql.org
Date: 2017-09-12T15:49:01Z
Lists: pgsql-hackers

Attachments

On 2017-07-21 13:49, Sokolov Yura wrote:
> On 2017-05-17 17:46, Sokolov Yura wrote:
>> Alvaro Herrera писал 2017-05-15 20:13:
>>> As I understand, these patches are logically separate, so putting 
>>> them
>>> together in a single file isn't such a great idea.  If you don't edit
>>> the patches further, then you're all set because we already have the
>>> previously archived patches.  Next commitfest starts in a few months
>>> yet, and if you feel the need to submit corrected versions in the
>>> meantime, please do submit in separate files.  (Some would even argue
>>> that each should be its own thread, but I don't think that's 
>>> necessary.)
>> 
>> Thank you for explanation.
>> 
>> I'm adding new version of first patch with minor improvement:
>> - I added detection of a case when all buckets are trivial
>>   (ie 0 or 1 element). In this case no need to sort buckets at all.
> 
> I'm putting rebased version of second patch.

Again rebased version of both patches.
Now second patch applies cleanly independent of first patch.

-- 
Sokolov Yura aka funny_falcon
Postgres Professional: https://postgrespro.ru
The Russian Postgres Company

Commits

  1. Avoid looping through line pointers twice in PageRepairFragmentation().

  2. Reduce pinning and buffer content locking for btree scans.

  3. Speed up in-memory tuplesorting.