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 1kC8oU-00065l-69 for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Aug 2020 21:55:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kC8oS-00051u-Uq for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Aug 2020 21:55:04 +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 1kC8oS-00051n-NZ for pgsql-hackers@lists.postgresql.org; Sat, 29 Aug 2020 21:55:04 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kC8oP-0004BZ-9v for pgsql-hackers@lists.postgresql.org; Sat, 29 Aug 2020 21:55:03 +0000 Received: by mail-ed1-x542.google.com with SMTP id c10so2201301edk.6 for ; Sat, 29 Aug 2020 14:55:00 -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:references:mime-version :content-disposition:in-reply-to; bh=nJt5QjLt7B/QiwezuFGoszOpTCgOqM/9cLPV1I6TdzQ=; b=ONgPSd5l5bQuk87rVPfr9ziVDnsDXAh1JXA87mj7t59X9xSxwQdRenYz4g4N76hD2Y C43I19S7oyMXYX3KbwRzOfoZJ5dvTvarn5N3+9Ex31tZ1T836Bf8q2QyB62yrQPj5mfI EPSaAQeroEoeOwMs2aRJwURRluQPZbG3s0zCX7fIK+6ymdZvVo3abPqid5NWWyrYqrhI LU2yEkpiH2ihYhhGblO8Ltbw/iI1jZfKjcCc4bxXBlKgRFHr/zrFYbOntwK/Ic++PMLn 8IHUQehDiAVR5cJU0247pOOmrNo1NiWT9pzOCeMX3NsvAzjFHWCW2O/HCWNKOF/bA3Nx 0Hkg== 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; bh=nJt5QjLt7B/QiwezuFGoszOpTCgOqM/9cLPV1I6TdzQ=; b=CrfBs/DI6TXuTXSOktw5yU3utfz10J/3MWkk4BxGR9dhlIsQsTOclA1lAqQLg0w3RW pkTXatsW2WNoHPu/2zPtnpE+Q5dHGHZrIfDGtLFy8C3ta6tZsrbdlJ3XJ55commm05uS V6vbx/Gcv5zBA9Ee/YLmwnhVf1LUFgyY5EsbUHKXGc7GtOFmszrV8AZp7P/Y5bxY6J/4 YZygtHbOqhNKIHI1tPyYi5XV8/ol1bBhod/8Ym7Emd3XBgiob7i7ur1ZIGTe9YdxYZgv jDS0SkG09m9r/t1f8LDkLbCOKHtzNe8xwJRt0dYJYwKitvvbAHJfTQne+wvqgarxIcLK rdpg== X-Gm-Message-State: AOAM531L8DXkL9aCeoNyNpoYurPCeEn2Vuh6Fgvyu/Q3qVQ/eckZrWEQ bKtvi/mJJTwENGhmC/kVcbC/eA== X-Google-Smtp-Source: ABdhPJyDtmlgl1SqsVoF/dyMJINUgakEnzGjKCzFq6v/NIkwa6JiJbJlZ+RA3WC/SZ9FAUaZtC7Ddg== X-Received: by 2002:a50:ed17:: with SMTP id j23mr5036526eds.158.1598738099603; Sat, 29 Aug 2020 14:54:59 -0700 (PDT) Received: from localhost (ip-86-49-253-216.net.upcbroadband.cz. [86.49.253.216]) by smtp.gmail.com with ESMTPSA id op24sm3248152ejb.87.2020.08.29.14.54.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Aug 2020 14:54:59 -0700 (PDT) Date: Sat, 29 Aug 2020 23:54:58 +0200 From: Tomas Vondra To: Alvaro Herrera Cc: Tatsuro Yamada , Julien Rouhaud , Pavel Stehule , PostgreSQL Hackers Subject: Re: list of extended statistics on psql Message-ID: <20200829215458.ca6pnchavgfhs2pf@development> References: <6fc07377-c8c5-c762-2e2c-77059d8147af@nttcom.co.jp_1> <20200828032617.GA22893@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20200828032617.GA22893@alvherre.pgsql> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Aug 27, 2020 at 11:26:17PM -0400, Alvaro Herrera wrote: >On 2020-Aug-28, Tatsuro Yamada wrote: > >> > IMO the per-type columns should show both the type being enabled as >> > well as it being built. >> >> Hmm. I'm not sure how to get the status (enabled or disabled) of >> extended stats. :( >> Could you explain it more? > >pg_statistic_ext_data.stxdndistinct is not null if the stats have been >built. (I'm not sure whether there's an easier way to determine this.) > It's the only way, I think. Which types were requested is stored in pg_statistic_ext.stxkind and what was built is in pg_statistic_ext_data. But if we want the output to show both what was requested and which types were actually built, that'll effectively double the number of columns needed :-( Also, it might be useful to show the size of the statistics built, just like we show for \d+ etc. regards -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services