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 1kxfQZ-0002dx-BE for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jan 2021 00:14:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kxfQW-0000VM-UV for pgsql-hackers@arkaria.postgresql.org; Fri, 08 Jan 2021 00:14:48 +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 1kxfQW-0000VF-Ki for pgsql-hackers@lists.postgresql.org; Fri, 08 Jan 2021 00:14:48 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kxfQS-00040o-EU for pgsql-hackers@lists.postgresql.org; Fri, 08 Jan 2021 00:14:47 +0000 Received: by mail-ed1-x531.google.com with SMTP id c7so9472498edv.6 for ; Thu, 07 Jan 2021 16:14:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=6WklQlHnD0G2dnBpJ62D5qOoLk3p9p946xAdAHj43SE=; b=QrpansK4jPBQfb8ciczIx0rdS2/VLl54ajfjXTh6hbYprlsTNbZe+1Rgcq1RF3cOnI J1tvbnkMzotBno8efaRgTwPCObqpR3+OaaY/3h720+XDnr/02ymcJSfaGzJlxG/ttHtW 5cQstsbjC3epxjeMP3q6n+YeRLCWbzdqgOGg/HXBge3vHL0gfh+538cHBcfBD3kLW8N/ /SS4B/u6AN2gWl0mafRC/LPo0w+/96iPlrerYzD48i5JtphVa/SB5RGNjtcKMb5l3LZW qQfgHBaHYLiK3pYSIkiRm/TzuyAbp7bjhhPnBwW61xqqlPdVzvenGWuztvCFdlbIqqm8 E4/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6WklQlHnD0G2dnBpJ62D5qOoLk3p9p946xAdAHj43SE=; b=sKqBpbvgr+B/VroMvCcxXVRwISMeYI5xZwVkDRxQ5oAXe92RvzrXXJuQ+JwN0QQcEo Wy0NQNZ+RWDe6/dPEkaHNr2iMZI6Hx12a54tfUlUGs+mtJQUfX4507f4oMRaEd6/0NnM PGbi0bUSXd0Ausi2DPvFJFJmsNkoI8qqfwGpt3D3HYkZU9EQ2i5BrWidYlE6nDAfHvqX gQbg/uQsIPrTxapuD1sThj1qwlc5GoBpInMtQHFpe17NbkVGuT1SFvpnSNLxYrXofffa CxBpFuvTpaZKq74f22JLTPIEBK6F+aJyLSEmkAHXq1cFDA/p8KPRmurcNhPqdGcA78+V R0dg== X-Gm-Message-State: AOAM532EfTaLa34sGG6Lrlg5Rg+Lngz7aopicSqP16k44C90B+/Asp4V Ms1DQsDcl5e43hb67DgOTRy+qunL6Gqa9a5x3aV/QM76C/y9GWauds44TsnT5y8t2c3fzaBYH2b FP8wPBdkPDUHUHtxJG83OWvcSIduKv4Y88d9TH8vejrw+npnpJZGLpbatu8zHEZDWe3a44bqXmp k5WXBm0ykfiQQylWxA/fuQtdYHoHFatWyXM68DDHTuH8MKYUhbMMbeOkz1SIsTypihuJjd4XQB5 WoMr/K35YtsA/NbdokY2ioEw24olsUkMNzuXuoijYAykRl7LXgmyqnv X-Google-Smtp-Source: ABdhPJxu6p7uLvu1vRPINXCc1a9fIKQGUlTLJFc+shUm2SoYPt0m6c1ofUhuiE4IZWWuiajUoIrTNg== X-Received: by 2002:aa7:dc4b:: with SMTP id g11mr3539718edu.379.1610064881830; Thu, 07 Jan 2021 16:14:41 -0800 (PST) Received: from [10.137.0.20] (ip-86-49-249-71.net.upcbroadband.cz. [86.49.249.71]) by smtp.gmail.com with ESMTPSA id qp16sm2963111ejb.74.2021.01.07.16.14.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Jan 2021 16:14:40 -0800 (PST) Subject: Re: list of extended statistics on psql To: Tatsuro Yamada , Alvaro Herrera Cc: Tomas Vondra , Michael Paquier , Pavel Stehule , Julien Rouhaud , PostgreSQL Hackers References: <20210107144713.GA8872@alvherre.pgsql> <61cba5af-5a58-6bda-610c-420077b780c3@enterprisedb.com> <1045d2cb-7ecd-e6bf-cb50-8eeea89cc4b0@nttcom.co.jp_1> From: Tomas Vondra Message-ID: <9e76ce7a-e7ab-5f08-9938-59fffc20d106@enterprisedb.com> Date: Fri, 8 Jan 2021 01:14:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <1045d2cb-7ecd-e6bf-cb50-8eeea89cc4b0@nttcom.co.jp_1> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-CLOUD-SEC-AV-Info: enterprisedb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 1/8/21 12:52 AM, Tatsuro Yamada wrote: > Hi, > > On 2021/01/08 0:56, Tomas Vondra wrote: >> On 1/7/21 3:47 PM, Alvaro Herrera wrote: >>> On 2021-Jan-07, Tomas Vondra wrote: >>> >>>> On 1/7/21 1:46 AM, Tatsuro Yamada wrote: >>> >>>>> I overlooked the check for MCV in the logic building query >>>>> because I created the patch as a new feature on PG14. >>>>> I'm not sure whether we should do back patch or not. However, I'll >>>>> add the check on the next patch because it is useful if you decide to >>>>> do the back patch on PG10, 11, 12, and 13. >>>> >>>> BTW perhaps a quick look at the other \d commands would show if >>>> there are >>>> precedents. I didn't have time for that. >>> >>> Yes, we do promise that new psql works with older servers. >>> >> >> Yeah, makes sense. That means we need add the check for 12 / MCV. > > > Ah, I got it. > I fixed the patch to work with older servers to add the checking > versions. And I tested \dX command on older servers (PG10 - 13). > These results look fine. > > 0001: >      Added the check code to handle pre-PG12. It has not MCV and >       pg_statistic_ext_data. > 0002: >      This patch is the same as the previous patch (not changed). > > Please find the attached files. > OK, thanks. I'll take a look and probably push tomorrow. FWIW I plan to squash the patches into a single commit. regards -- Tomas Vondra EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company