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 1jm8IR-0001uz-3f for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jun 2020 04:06:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jm8IQ-0005G7-0u for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Jun 2020 04:06:30 +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 1jm8IP-0005Fz-QF for pgsql-hackers@lists.postgresql.org; Fri, 19 Jun 2020 04:06:29 +0000 Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jm8IN-0006yg-Fu for pgsql-hackers@lists.postgresql.org; Fri, 19 Jun 2020 04:06:28 +0000 Received: by mail-il1-x143.google.com with SMTP id t8so8059259ilm.7 for ; Thu, 18 Jun 2020 21:06:27 -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=mQ4hXI+bHdHnpjkW/DoJYUmEt72pi6Wc2mI+LlPZGnQ=; b=rURztJaBnVww2Crnh4YKNUBKVZ8LFTHWZHe3ZsFrkTOg0rVpuhmNwi68ZlWK3mvVJB JXZOxpgyHb82VqYZuZRAcVL9Q0tndcP6j3WRst7EZ1xGMubpFrkw754Xn3hcfv6Ei2g3 Q5eW8nfAg9CQOkrJQW++HraS4/ONMLuYve4dbF7lBXhFitj7+UBaKyx31+8abZSTrQ7W Mx0nuMxrqxFD2K0GI3D5X11XdhUZFnyxyI/gmojmjqWTGNMtejpUmje4hhWUuPRDTO/R PT3bsLQSaDm1wl+dfwNiBmmRSfysxQDDPpLWXu+lgPmTWZCKIPvdUIIUPdhWhPZzcXt7 Q47A== 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=mQ4hXI+bHdHnpjkW/DoJYUmEt72pi6Wc2mI+LlPZGnQ=; b=g7Z7AzhNEkfF2o+BVaNpq5m1JlR7NRB0WC/3yRVPH1woqz8Ybke9GpaN+ipG1l1GZK nRsUX74hqsShZ2q8VsmQHPskth/Gbqj4qeeYG9VQVfvnBdZ2L3MCPTBpMI+r46Tpo8To dXI5Yd5Y2qvwhepnaJiGwrT90I1VAP1WSVoo0wOCvGw7a9BTetNPBNV+tJkTSv9dMPfL AONwJ34zOvKL+NUYzK2gM6uutzdsR/Z7V/Uo51NN6AT3EHw2ql17t6flXjyZMOuZHgWO YqvbtE1wZ/wMZKPeRVgN+A202FDuSPOJQKE/Hi9Ky0yqxiQcPV0o8e6KwW9kkTprV1PI a+SA== X-Gm-Message-State: AOAM531onV2dK16XRARKK6MFVYSu0OBXvq6xgVBb14AoPLDkAfdRYqDJ +BU9mWokoSnNV+XylNiBYk+i5Q== X-Google-Smtp-Source: ABdhPJz8hjz8HJbflY4NT6k62d28kPuIwvZRvErIhzmy+mSSpx/tskcmmsK5W3AY3/6bRoHZ58teLQ== X-Received: by 2002:a92:6e11:: with SMTP id j17mr1809346ilc.54.1592539586732; Thu, 18 Jun 2020 21:06:26 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id e12sm2594810ili.68.2020.06.18.21.06.25 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Jun 2020 21:06:26 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 622A980086E; Thu, 18 Jun 2020 23:06:24 -0500 (CDT) Date: Thu, 18 Jun 2020 23:06:24 -0500 From: Justin Pryzby To: David Rowley Cc: pgsql-hackers@lists.postgresql.org, Jeff Davis Subject: Re: Missing HashAgg EXPLAIN ANALYZE details for parallel plans Message-ID: <20200619040624.GA17995@telsasoft.com> References: <20200618134514.GF17995@telsasoft.com> <20200619022001.GY17995@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 Fri, Jun 19, 2020 at 03:03:41PM +1200, David Rowley wrote: > On Fri, 19 Jun 2020 at 14:20, Justin Pryzby wrote: > > Please be sure to use two spaces between each field ! > > > > See earlier discussions (and commits referenced by the Opened Items page). > > https://www.postgresql.org/message-id/20200402054120.GC14618@telsasoft.com > > https://www.postgresql.org/message-id/20200407042521.GH2228%40telsasoft.com > > Thanks. I wasn't aware of that conversion. To be clear, there wasn't a "conversion". There were (and are still) different formats (which everyone agrees isn't ideal) used by "explain(BUFFERS)" vs Sort and Hash. The new incr sort changed from output that looked like Buffers (one space, and equals) to output that looked like Sort/Hashjoin (two spaces and colons). And the new explain(WAL) originally used a hybrid (which, on my request, used two spaces), but it was changed (back) to use one space, for consistency with explain(BUFFERS). Some minor nitpicks now that we've dealt with the important issue of whitespace: + bool gotone = false; => Would you consider calling that "found" ? I couldn't put my finger on it at first why this felt so important to ask, but realized that my head was tripping over a variable whose name starts with "goto", and spending 0.2 seconds trying to figure out what you might have meant by "goto ne". + int n; + + for (n = 0; n < aggstate->shared_info->num_workers; n++) => Maybe use a C99 declaration ? + if (hash_batches_used > 0) + { + ExplainPropertyInteger("Disk Usage", "kB", hash_disk_used, + es); + ExplainPropertyInteger("HashAgg Batches", NULL, + hash_batches_used, es); + } => Shouldn't those *always* be shown in nontext format ? I realize that's not a change new to your patch, and maybe should be a separate commit. + size = offsetof(SharedAggInfo, sinstrument) + + pcxt->nworkers * sizeof(AggregateInstrumentation); => There's a couple places where I'd prefer to see "+" at the end of the preceding line (but YMMV). -- Justin