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 1jLx3L-0000r3-Bl for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 22:50:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jLx3K-0007Kc-5x for pgsql-hackers@arkaria.postgresql.org; Tue, 07 Apr 2020 22:50:42 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jLx3J-0007KV-VL for pgsql-hackers@lists.postgresql.org; Tue, 07 Apr 2020 22:50:41 +0000 Received: from mail-qk1-x72a.google.com ([2607:f8b0:4864:20::72a]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jLx3G-000207-R4 for pgsql-hackers@postgresql.org; Tue, 07 Apr 2020 22:50:41 +0000 Received: by mail-qk1-x72a.google.com with SMTP id v7so1285384qkc.0 for ; Tue, 07 Apr 2020 15:50:38 -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=J4OMbD/ng6lJtdIH3v0qpWEpxRQXWQ0dXk8QdFIrDzA=; b=E/ue1saLAMHGptqft/8ZfHm9Waj3GgpC42z7+k6pIYxeBmScq17jYfF9bgzX/xJFGD /jtPu+wlTIuP86XeuhdBWnrsnvmEkc2Jm8/t99H27ehn0GjfWwnQl9vdOZ6eHIfC9Fwv ZxQDNYW3LB4ZHr7iF4HrKeCVqSRLQnFszNqDMuoYpKRSA7i8ruHH4pl+4YT8fKPGBjrw f5yw206F72459H0CNHNQmw5jdkc8MuSil8OciV23bSaYjMmmiER8fOFtlLpi+fS0sfYv dil96/BXSyM+XHxNKkxmP1bee2nQqOmUb4MfeoAQW4pMu1JKZFHUWfsocnhoF6KgqR5K JqoA== 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=J4OMbD/ng6lJtdIH3v0qpWEpxRQXWQ0dXk8QdFIrDzA=; b=lOba1LYKzQ02DwPU65f4tOXwO2f4xr+LW5VmPWhThfOn6D0WTk9bvJaQ9Sfi2AZJ+z AumASbyzqDjSXu9XOWCZD2TFv60W4d/J1JU5GPXKoz9yVVs7HAw8WfRN1CWGGwR5vVPj dFcYbiSgxCvcR5MANwbM3SNUX0R1NJ5XfNMsxUbjTIci7/gdt0e5IHrssND2AGxfAkrZ cEcN4Jo2zTHw+Nd8lCZgCr8qbaUsEfzX2umnkA4ftDlMciL3LPjoF8V3GYlxxbdh9VWW aloKBw0pTwn9XJ0yjF0JhAzifboxn14hQ1577THI25+yaGmlGUHNE5bYQK9QX6a4lPgV 6P0w== X-Gm-Message-State: AGi0PuaJUBJjy2jKZomFWxoaacXk6nwTokXt9LPjPg6j2LEjBnoI8TQV FPZFe90hUYcfafRtySBPuAg+cg== X-Google-Smtp-Source: APiQypKKNXD8im9j58p+5FgF29nTzXi+JWDO3ejIX9bMTczzq/I3nUQKP9Kt3Wg/JJq86Slz6Y4srA== X-Received: by 2002:a05:620a:c0b:: with SMTP id l11mr3702768qki.270.1586299836888; Tue, 07 Apr 2020 15:50:36 -0700 (PDT) Received: from pryzbyj (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id a136sm18200509qkb.15.2020.04.07.15.50.35 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2020 15:50:35 -0700 (PDT) Received: by pryzbyj (Postfix, from userid 1000) id 7F221800897; Tue, 7 Apr 2020 17:50:34 -0500 (CDT) Date: Tue, 7 Apr 2020 17:50:34 -0500 From: Justin Pryzby To: Peter Eisentraut Cc: Amit Kapila , Dilip Kumar , Julien Rouhaud , Kuntal Ghosh , Fujii Masao , Kirill Bychik , pgsql-hackers@postgresql.org, Thomas Munro Subject: Re: WAL usage calculation patch Message-ID: <20200407225034.GV2228@telsasoft.com> References: <20200406163109.GD2228@telsasoft.com> <61b66de7-ebb3-fada-b6d3-243386976631@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <61b66de7-ebb3-fada-b6d3-243386976631@2ndquadrant.com> 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 12:00:29PM +0200, Peter Eisentraut wrote: > We also have existing cases for the other way: > > actual time=0.050..0.052 > Buffers: shared hit=3 dirtied=1 > > The cases mentioned by Justin are not formatted in a key=value format, so > it's not quite the same, but it also raises the question why they are not. > > Let's figure out a way to consolidate this without making up a third format. So this re-raises my suggestion here to use colons, Title Case Field Names, and "Size: ..kB" rather than "bytes=": |https://www.postgresql.org/message-id/20200403054451.GN14618%40telsasoft.com As I see it, the sort/hashjoin style is being used for cases with fields with different units: Sort Method: quicksort Memory: 931kB Buckets: 1024 Batches: 1 Memory Usage: 16kB ..which is distinguished from the case where the units are the same, like buffers (hit=Npages read=Npages dirtied=Npages written=Npages). Note, as of 1f39bce021, we have hashagg_disk, which looks like this: template1=# explain analyze SELECT a, COUNT(1) FROM generate_series(1,99999) a GROUP BY 1 ORDER BY 1; ... -> HashAggregate (cost=1499.99..1501.99 rows=200 width=12) (actual time=166.883..280.943 rows=99999 loops=1) Group Key: a Peak Memory Usage: 4913 kB Disk Usage: 1848 kB HashAgg Batches: 8 Incremental sort adds yet another variation, which I've mentioned that thread. I'm hoping to come to some resolution here, first. https://www.postgresql.org/message-id/20200407042521.GH2228%40telsasoft.com -- Justin