Re: Polyphase merge is obsolete - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Polyphase merge is obsolete
Date
Msg-id 7ad9d969-f25c-2c54-a9df-4bea09a11301@iki.fi
Whole thread Raw
In response to Re: Polyphase merge is obsolete  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 10/12/2016 08:27 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> The beauty of the polyphase merge algorithm is that it allows reusing
>> input tapes as output tapes efficiently ... So the whole idea of trying to
>> efficiently reuse input tapes as output tapes is pointless.
>
> It's been awhile since I looked at that code, but I'm quite certain that
> it *never* thought it was dealing with actual tapes.  Rather, the point of
> sticking with polyphase merge was that it allowed efficient incremental
> re-use of temporary disk files, so that the maximum on-disk footprint was
> only about equal to the volume of data to be sorted, rather than being a
> multiple of that.  Have we thrown that property away?

No, there's no difference to that behavior. logtape.c takes care of 
incremental re-use of disk space, regardless of the merging pattern.

- Heikki




pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Non-empty default log_line_prefix
Next
From: Tom Lane
Date:
Subject: Re: int2vector and btree indexes