Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1buNJg-0006JB-Ta for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 17:27:45 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1buNJf-0006Lp-Ny for pgsql-hackers@arkaria.postgresql.org; Wed, 12 Oct 2016 17:27:43 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buNJf-0006Li-2w for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 17:27:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1buNJc-0004IT-G1 for pgsql-hackers@postgresql.org; Wed, 12 Oct 2016 17:27:41 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u9CHRPnN001163; Wed, 12 Oct 2016 13:27:25 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers Subject: Re: Polyphase merge is obsolete In-reply-to: <420a0ec7-602c-d406-1e75-1ef7ddc58d83@iki.fi> References: <420a0ec7-602c-d406-1e75-1ef7ddc58d83@iki.fi> Comments: In-reply-to Heikki Linnakangas message dated "Wed, 12 Oct 2016 20:16:07 +0300" Date: Wed, 12 Oct 2016 13:27:25 -0400 Message-ID: <1162.1476293245@sss.pgh.pa.us> X-Pg-Spam-Score: -2.2 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Heikki Linnakangas 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? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers