Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLqXJ-00067S-Uq for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 15:53:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLqXI-0008Gz-Dx for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 15:53:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLqXI-0008DS-3b for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 15:53:12 +0000 Received: from mail-qv1-xf43.google.com ([2607:f8b0:4864:20::f43]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLqXF-0005PZ-4G for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 15:53:10 +0000 Received: by mail-qv1-xf43.google.com with SMTP id ca9so2036746qvb.9 for ; Tue, 07 Apr 2020 08:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=63PDEmUU+ysbWjdLST/nMaMsx/LYmVXt6X+pX1ncIyQ=; b=yABqTjOV5Uthrchk4NxuDt5spHRqkfxrF865Al17S6QEFmUKS3f0JBoq9s79RcpKpX HoENXJz1ELFUDoWt8p9VfkabveCnWtQvn+GudjobhlPJSSID3I91Kuj6yqdHj94TuOil fhI8ujMEeXaUFx6xfwZOFtto1y7s581mEjeLOZdGdrozW//ms0vwL3y7C6aLMX4sJWd6 vJR/eHODVOnLD8gyon+78qUh3FSGFeKoMqQyTLLz55caRwA6QFjS7sOnzUprCOsQ/nB3 BNJ0T6u2bZCTEKuxKvpl4OaNZNLnvdcJ17+ai8RQfhOmNVhe+hDhrNBfMaWfPMY6hrpW JaDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=63PDEmUU+ysbWjdLST/nMaMsx/LYmVXt6X+pX1ncIyQ=; b=IHRUAX0SJve9W8Bvj/7nuAoSQGgsG5St6kv+nNERJPCauB0HK9rBA6qj1JG7B77ZjM RoFTBnfu4PHwM+U7ay5ubD048bxEdSE6rvoL9QruUuTGvO1abvPlQhuh3lbHto6KBHJS cYV6HDYjcxXb2ijhtTVTVC1JZaYt7yACKjzajNJtEn/M3ZYe5McdGJKAqmO7brdUtK6k PECPT3UdTwLd1s+MA6Loqh2zm4hTs+j+9Ug5iczrQbuuH8VSLdyqdiq9oWJQ8PYY+947 8nLePgk5qDmEwWMmHkm4uxPvIszEveUefucCsx12Z4ShwOYFCIAXE2DqcjKY8Lm1YcL7 3Gew== X-Gm-Message-State: AGi0PuZjkf/k2YP02dIe75bqOTY3yIVbDxsgjPJBFkrYE02KrbkS4ULY MIwhCIUoX6Hj3zxIHt7vRhuAPA== X-Google-Smtp-Source: APiQypJo3pOEkdsX3KPRKIGej9iWvt9ni3MplziHCgzK7tbyeVwVK7/tAzop4U57Q5BKQ3pHDVzL2A== X-Received: by 2002:a0c:b893:: with SMTP id y19mr2876729qvf.223.1586274787924; Tue, 07 Apr 2020 08:53:07 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id d17sm7143632qtb.74.2020.04.07.08.53.06 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2020 08:53:07 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 97221800C2E; Tue, 7 Apr 2020 10:53:05 -0500 (CDT) Date: Tue, 7 Apr 2020 10:53:05 -0500 From: Justin Pryzby To: James Coleman Cc: Tomas Vondra , Tom Lane , Alvaro Herrera , Michael Paquier , Rafia Sabih , Peter Geoghegan , Simon Riggs , Shaun Thomas , Dmitry Dolgov <9erthalion6@gmail.com>, Alexander Korotkov , PostgreSQL Developers , Peter Eisentraut , Andreas Karlsson Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort) Message-ID: <20200407155305.GL2228@telsasoft.com> References: <20200402024746.5wlwk6q7eiv5faux@development> <20200403002028.kp3rxncmwvsui6xz@development> <20200405130110.2bdxaz4ed5jx2eae@development> <20200406195722.teiha6foiy3lix3s@development> <20200407042521.GH2228@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Tue, Apr 07, 2020 at 08:40:30AM -0400, James Coleman wrote: > On Tue, Apr 7, 2020 at 12:25 AM Justin Pryzby wrote: > > On Mon, Apr 06, 2020 at 09:57:22PM +0200, Tomas Vondra wrote: > > > I've pushed the fist part of this patch series - I've reorganized it a > > > > I scanned through this again post-commit. Find attached some suggestions. > > > > Shouldn't non-text explain output always show both disk *and* mem, including > > zeros ? > > Could you give more context on this? Is there a standard to follow? > Regular sort nodes only ever report one type, so there's not a good > parallel there. Right, I'm not sure either, since it seems to be a new case. Maybe Tomas has a strong intuition. See at least the commit messages here: 3ec20c7091e97a554e7447ac2b7f4ed795631395 7d91b604d9b5d6ec8c19c57a9ffd2f27129cdd94 8ebb69f85445177575684a0ba5cfedda8d840a91 Maybe this one suggests that it should *not* be present unconditionally, but only when that sort type is used? 4b234fd8bf21cd6f5ff44f1f1c613bf40860998d Another thought: is checking if bytes>0 really a good way to determine if a sort type was used ? It seems like checking a bit or a pointer would be better. I guess a size of 0 is unlikely, and it's ok at least in text mode. if (groupInfo->maxMemorySpaceUsed > 0) On Tue, Apr 07, 2020 at 08:40:30AM -0400, James Coleman wrote: > > And, should it use two spaces before "Sort Method", "Memory" and "Pre-sorted ... > I read through that subthread, and the ending seemed to be Peter > wanting things to be unified. Was there a conclusion beyond that? This discussion is ongoing. I think let's wait until that's settled before addressing this more complex and even newer case. We can add "explain, two spaces and equals vs colon" to the "Open items" list if need be - I hope the discussion will not delay the release. -- Justin