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 1kCusi-0000Hi-El for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 01:14:40 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kCusf-0002ge-2X for pgsql-hackers@arkaria.postgresql.org; Tue, 01 Sep 2020 01:14:37 +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 1kCuse-0002gX-NY for pgsql-hackers@lists.postgresql.org; Tue, 01 Sep 2020 01:14:36 +0000 Received: from mail-il1-x144.google.com ([2607:f8b0:4864:20::144]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kCusb-0007Tm-2t for pgsql-hackers@postgresql.org; Tue, 01 Sep 2020 01:14:36 +0000 Received: by mail-il1-x144.google.com with SMTP id q6so2455133ild.12 for ; Mon, 31 Aug 2020 18:14:32 -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:content-transfer-encoding:in-reply-to :user-agent; bh=iFGwaSsMf6PGwsBfxCe/EU3j9Jo0EfiUAU9VjvNx+/M=; b=1ngpUM80+0Blxkn7F/Fy58aJdfp3gJyyhxPHLgN9jDQo2h92R4krVCkacTAmivMKMd CWRvFxAxTpvq4tSiCebLWsWzXpNLnNs/nrODYv7CzdT39tXw0ePSouND8WN/0fXobrpl hM00RrUcy2x1gpJJBCeBb6uwiGQWFadlIyKEmYEAVJsCVYZgMYAQFY06Yvh7NWJPTv15 4MrzRHFPUFcTtzaabj+rWqyQnhrGHKAg6mX60ILjF/7UIfHc4gF4leMKkgibhEPDDf2r fTsk8prwPSAVk9fAlxjiB6Rn2XDkk6GgdapIJmREnmRHk3zoDhvmJICTiGGqxm0FSeFl jPiw== 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:content-transfer-encoding :in-reply-to:user-agent; bh=iFGwaSsMf6PGwsBfxCe/EU3j9Jo0EfiUAU9VjvNx+/M=; b=Zk8JHJrPtm5u/XMgOdbrfsntMAQnb+bu6nxJXbSmzJeBxPT8EdnhsNbMfcL5pi6vHG ghWUyyvP5+MrZ+3Qwum4HL+xULEsztF1Ryf+SBRfKNZ8D3e4sSn15dt3N0VQ1ss9o18I qrCRZNq9N9WlbSwPM+Akpw8VvvSO1nPK9vcol23AMjOYm/lPWWsF6dVLETne5FFLNtuo OejTTXOe6bfzO9g/ISNxikdbEMWml8T6a3oUFTt7w6iPUeMuydAYUOPCYRFxh/n/3+jp ZdoD4pti1H/iNMJjhaPToUTtyLWyRedr1nO9VRWm36HtMjIOau5b08CF5Ivk979fkUsd Q8oA== X-Gm-Message-State: AOAM531rpBZ2NjYc6C67pFaPTFLlbVL/24xrKbvBTlT8qR1SkmNNcU9c +/EdxBOlv20xV5h0PdS+QW16uA== X-Google-Smtp-Source: ABdhPJwvf7d60EymGwLzSMD1is2tBCNcIBY+YUTs3CkIjFf1FQYohpgVWdVR0s1/EgF7Mj8J8rPHrA== X-Received: by 2002:a92:d704:: with SMTP id m4mr3528921iln.272.1598922871206; Mon, 31 Aug 2020 18:14:31 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id l12sm4882025ioq.50.2020.08.31.18.14.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2020 18:14:30 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 82317800272; Mon, 31 Aug 2020 20:14:29 -0500 (CDT) Date: Mon, 31 Aug 2020 20:14:29 -0500 From: Justin Pryzby To: gkokolatos@pm.me Cc: pgsql-hackers@postgresql.org, Tomas Vondra , Tatsuro Yamada Subject: Re: v13: show extended stats target in \d Message-ID: <20200901011429.GZ5450@telsasoft.com> References: <20200831050047.GG5450@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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 Mon, Aug 31, 2020 at 07:47:35AM +0000, gkokolatos@pm.me wrote: > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ > On Monday, 31 August 2020 08:00, Justin Pryzby wrote: > > > The stats target can be set since commit d06215d03, but wasn't shown by psql. > > ALTER STATISISTICS .. SET STATISTICS n. > > > > Normal (1-D) stats targets are shown in \d+ table. > > Stats objects are shown in \d (no plus). > > Arguably, this should be shown only in "verbose" mode (\d+). > > This seems rather useful. May I suggest you add it to the commitfest? I added at https://commitfest.postgresql.org/29/2712/ + appendPQExpBuffer(&buf, " STATISTICS %s", Maybe it should have a comma, like ", STATISTICS %s"? Similar to these: appendPQExpBuffer(&buf, ", ON TABLE %s", |Triggers: | trg1 AFTER INSERT ON trigpart3 FOR EACH ROW EXECUTE FUNCTION trigger_nothing(), ON TABLE trigpart and: appendPQExpBufferStr(&buf, ", PARTITIONED"); |part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED, Also, now I wonder if CREATE STATISTICS should support some syntax to set the initial target. Like: |CREATE STATISTICS abstats ON a,b FROM child.abc_202006 WITH(STATISTICS 111); -- Justin