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 1jJRAe-0000D4-Fd for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2020 00:23:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJRAc-0008Qi-70 for pgsql-hackers@arkaria.postgresql.org; Wed, 01 Apr 2020 00:23:50 +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 1jJRAb-0008Qb-C4 for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2020 00:23:49 +0000 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jJRAU-0006yE-De for pgsql-hackers@lists.postgresql.org; Wed, 01 Apr 2020 00:23:47 +0000 Received: by mail-qk1-x743.google.com with SMTP id o10so25233519qki.10 for ; Tue, 31 Mar 2020 17:23:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=qco+m7A78Taw7CfGzKxsvO9W0+30Q8KPsXLIVhVijDg=; b=l2DFwWwV1qISRh6Fdp9wntKEKgcUaYHGkzkWdiMwKUyVK7djqfsuLho4b5Rx5s4k1R 4sg/6StSdE50Hp0ihDjn6NmF900bjYtpgouwzVo3WeqWQiXPQtqASRnc8JJGyrhQKRx9 DFLBDrLnbGUEnuv9zA8QEJr9uwxOgj6yVs5BfQb4kure3mYP548if6qr0km1Dndysxly RDKX0hCB/MXW6Ex/3elqk0+qFMEoJXslsPrC98jXSjFrVVRIz7nEkjmAEhlSCmvJnWHQ sD4fNfE4vBEelzYpxtoQBB2Xo1SFK4JkU7MrXOdldHZZbW8tAtwYaeucJ4s9IQPBayKl FSvA== 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:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=qco+m7A78Taw7CfGzKxsvO9W0+30Q8KPsXLIVhVijDg=; b=g+IpY6HZpo5GwHpg8ZdHz14wlSTNH8NfCEuJJdydCu8nn6MhMNcVVxXEzKU+AF2xgq 3E8rDt5Di3fY7uTtBgkaGl02AnM+0VUh4lcmFg1dLmvXQtjAoUnt2aoeBjFmOLGTAPLb /78bLDHARJPgqQtlebkga7lKkgAMoGUN+5ZbdbE4DA+R7SRbAye2wp7bCakO2CfPxsZK Kn5mbW/gqJz/LQPQeiSB94w7QC/ZHu/AiOLAtjZmwPbQLvnlZjfcAcqHxhbBT1YCFMSQ +WcIsoiiYFTD6/srMBVPHm2rhlLGl/rP4WBVZNnLYPNWajfE+Dm/XazHUnCeAclLamKy LQ8A== X-Gm-Message-State: ANhLgQ37P3c1OR44K+tLoWzoEtyJcQdf0k1kw3+OSBpeqD3r3NI71qBw j3p0+BDQgHN9iSlXX6+rCAgWjA== X-Google-Smtp-Source: ADFU+vuE1L6klrohzmwX7q2QqGYJzZUiqh6MxSa07SML4bz4jBItYzBtxnlhfSJPdv4RjgXKyMxShA== X-Received: by 2002:a37:648:: with SMTP id 69mr7947279qkg.353.1585700621467; Tue, 31 Mar 2020 17:23:41 -0700 (PDT) Received: from nimloth.alvh.no-ip.org ([190.95.18.252]) by smtp.gmail.com with ESMTPSA id n46sm405697qtb.48.2020.03.31.17.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2020 17:23:40 -0700 (PDT) Received: by nimloth.alvh.no-ip.org (Postfix, from userid 1000) id B38F4300A03; Tue, 31 Mar 2020 21:23:38 -0300 (-03) Date: Tue, 31 Mar 2020 21:23:38 -0300 From: Alvaro Herrera To: Tom Lane Cc: James Coleman , Tomas Vondra , Michael Paquier , Rafia Sabih , Peter Geoghegan , Simon Riggs , Shaun Thomas , Dmitry Dolgov <9erthalion6@gmail.com>, Alexander Korotkov , PostgreSQL Developers , Andreas Karlsson Subject: Re: [PATCH] Incremental sort (was: PoC: Partial sort) Message-ID: <20200401002338.GA11291@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <18988.1585677504@sss.pgh.pa.us> User-Agent: Mutt/1.10.1 (2018-07-13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2020-Mar-31, Tom Lane wrote: > James Coleman writes: > > On Tue, Mar 31, 2020 at 1:04 PM Tom Lane wrote: > >> Perhaps the semantics are such that that's actually sensible, but it's > >> far from a straightforward remapping of the old enum. > > > Right, I didn't see the explicit "= 0" in other enums there, so it > > made me wonder if it was intentional to designate that one had to be > > 0, but I guess without a comment that's a lot of inference. > > It's possible that somebody meant that as an indicator that the code > depends on palloc0() leaving the field with that value. But if so, > you'd soon find that out ... and an actual comment would be better, > anyway. git blame fingers this: commit bf11e7ee2e3607bb67d25aec73aa53b2d7e9961b Author: Robert Haas AuthorDate: Tue Aug 29 13:22:49 2017 -0400 CommitDate: Tue Aug 29 13:26:33 2017 -0400 Propagate sort instrumentation from workers back to leader. Up until now, when parallel query was used, no details about the sort method or space used by the workers were available; details were shown only for any sorting done by the leader. Fix that. Commit 1177ab1dabf72bafee8f19d904cee3a299f25892 forced the test case added by commit 1f6d515a67ec98194c23a5db25660856c9aab944 to run without parallelism; now that we have this infrastructure, allow that again, with a little tweaking to make it pass with and without force_parallel_mode. Robert Haas and Tom Lane Discussion: http://postgr.es/m/CA+Tgmoa2VBZW6S8AAXfhpHczb=Rf6RqQ2br+zJvEgwJ0uoD_tQ@mail.gmail.com I looked at the discussion thread. That patch was first posted by Robert at https://postgr.es/m/CA+Tgmoa2VBZW6S8AAXfhpHczb=Rf6RqQ2br+zJvEgwJ0uoD_tQ@mail.gmail.com without the "= 0" part; later Tom posted v2 here https://postgr.es/m/11223.1503695532@sss.pgh.pa.us containing the "= 0", but I see no actual discussion of that point. I suppose it could also be important to clarify that it's 0 if it were used as an array index of some sort, but I don't see that in 2017's commit. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services