Re: PoC: Partial sort - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: PoC: Partial sort
Date
Msg-id 56A36CE5.8000804@2ndquadrant.com
Whole thread Raw
In response to Re: PoC: Partial sort  (Alexander Korotkov <aekorotkov@gmail.com>)
Responses Re: PoC: Partial sort  (Peter Geoghegan <pg@heroku.com>)
Re: PoC: Partial sort  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
Hi,

On 10/20/2015 01:17 PM, Alexander Korotkov wrote:
> On Fri, Oct 16, 2015 at 7:11 PM, Alexander Korotkov
> <aekorotkov@gmail.com <mailto:aekorotkov@gmail.com>> wrote:
>
>     On Sun, Jun 7, 2015 at 11:01 PM, Peter Geoghegan <pg@heroku.com
>     <mailto:pg@heroku.com>> wrote:
>
>         On Sun, Jun 7, 2015 at 8:10 AM, Andreas Karlsson
>         <andreas@proxel.se <mailto:andreas@proxel.se>> wrote:
>         > Are you planning to work on this patch for 9.6?
>
>         FWIW I hope so. It's a nice patch.
>
>
>     I'm trying to to whisk dust. Rebased version of patch is attached.
>     This patch isn't passing regression tests because of plan changes.
>     I'm not yet sure about those changes: why they happens and are they
>     really regression?
>     Since I'm not very familiar with planning of INSERT ON CONFLICT and
>     RLS, any help is appreciated.
>
>
> Planner regression is fixed in the attached version of patch. It appears
> that get_cheapest_fractional_path_for_pathkeys() behaved wrong when no
> ordering is required.
>

Alexander, are you working on this patch? I'd like to look at the patch, 
but the last available version (v4) no longer applies - there's plenty 
of bitrot. Do you plan to send an updated / rebased version?


The main thing I'm particularly interested in is how much is this 
coupled with the Sort node, and whether it's possible to feed partially 
sorted tuples into other nodes.

I'm particularly thinking about Hash Aggregate, because the partial sort 
allows to keep only the "current group" in a hash table, making it much 
more memory efficient / faster. What do you think?

regards

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Improved tab completion for FDW DDL
Next
From: Jinhua Luo
Date:
Subject: Re: insert/update performance