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 1mcgBO-0007RP-JT for pgsql-docs@arkaria.postgresql.org; Tue, 19 Oct 2021 03:52:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mcgBN-00030Q-9x for pgsql-docs@arkaria.postgresql.org; Tue, 19 Oct 2021 03:52:57 +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 1mcgBL-00030H-Ks for pgsql-docs@lists.postgresql.org; Tue, 19 Oct 2021 03:52:57 +0000 Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mcgBJ-0003MC-3h for pgsql-docs@lists.postgresql.org; Tue, 19 Oct 2021 03:52:54 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id E92E55C00D5; Mon, 18 Oct 2021 23:52:50 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Mon, 18 Oct 2021 23:52:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=yyl5MD71aaUlxkj+q77Z2NOr9Im otY6qkCbpV5sLItw=; b=Hk1ylQu1uJ1FX6/+pc+x0EEhT/Hm5Im6KZPg44MTdag Ys03/1kPLLu0b/GRnvifhMHKux3fCOo7iOmwMY7vPeETTsA5GgRfkO8q3onDgno+ BjmIdkvU+kdmgKdyMOina90TT3KeDMsSXP6h/fzhxu0Lqe/GezYQE32agJLeMNd5 Iv6JGUuRGM/MDLdt2Gr1uaY95PYmrd3Jn/O8E14YEm/ozNAfEQuG0cKwNu/3phsc dtJNbrmggRsbbkK/fs0DDB1kQdX7pYr9OUzh8c38JMMI2ywDSkL/o99nSIFK5xFY kRTIcyRrlNlvdzQNwUEVdDNqz1NV8wTzOPsRvjG2ofA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=yyl5MD 71aaUlxkj+q77Z2NOr9ImotY6qkCbpV5sLItw=; b=Q0OJ3hk4C/FCbgm+aCmkv5 4zPiXzmcsogw2fDgXpXl7EX2swA1fcEA9xJtDpdtcSNSncK7EhaZOpsGFkIx6BCk OF4QXTYCGbYs5BuFghr/2gZJ/XdxGUrunZVJx0pCDWyJ4L8VIBsk2gr3dq1lvDX7 HvQG7S6I6OzzbfgE3ZGd77C9THSBN7Lv7PJ9vAIqUJXzyFIlxupt+PUu46eIETh7 /WUS4ZmBjyJSfsWNIlf5Wad37Hu+VmLppKrY8Idk9BCixa0wUjK7DzNLCgZL7Ajn H+Z8mFB8S/OHh8AyfcB94+7smoInLOdWIQZQ1C6iDJFH8QE9c5e5OOtVvuBdcE4Q == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddvuddgjeegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpedvgeduuefhtdeuleettdevjeeh heeiveeuieegleetgeeljeelieeuieehgeevhfenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Oct 2021 23:52:49 -0400 (EDT) Date: Tue, 19 Oct 2021 12:52:45 +0900 From: Michael Paquier To: Euler Taveira Cc: "nikolai.berkoff" , "pgsql-docs@lists.postgresql.org" Subject: Re: ALTER TABLE ... SET DATA TYPE removes statistics Message-ID: References: <99443f30-4c03-40e5-b403-055e1f3e706d@www.fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="IJbOhn5aoWaypdQd" Content-Disposition: inline In-Reply-To: <99443f30-4c03-40e5-b403-055e1f3e706d@www.fastmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --IJbOhn5aoWaypdQd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Oct 18, 2021 at 05:15:59PM -0300, Euler Taveira wrote: > I agree that it might surprise an user and it would be good to document it. > However, it does not belong to the description. I would add it to the Notes > section at the end of the ALTER TABLE page. No objections to the suggested addition and the location of the addition (paragraph of SET DATA TYPE rather than "Notes"), but I think that the phrasing could be better: "The column's statistics are removed, hence a follow-up ANALYZE is suited to update the statistics to the new column type." -- Michael --IJbOhn5aoWaypdQd Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmFuQQ0ACgkQnvQgOdby QH0tjRAAoeXTt9NZSOyB6FBfXoWb0F2OT7qlk2kpgg20V+qpWulqoCSF8Kd03Ww/ iIwLgrDRNVLGAq3mJbKztyS3AWTPB5LCy9ssDF7kzF1vFZpFBqZmUmoOS2GwLUSi s2KZvS+hJbTXkVI02lx+2fUvm2Pmwatw0EDaXLchi3qMS56D6xbWVuCNybqCiChp KhFLwq8IkRym4xwbl5tnaSTlTn0cKnebEMNcZamd8vT0W4+2GRevDCnLTaAqqkbd 66MFg3GriMdpqOO05zdIP4KqwJ3/y2jksIakgjS+khJH++NWzWQB+w2vLaA+gh7h nA6JnvpFxts253pXnbpvGuRsz4QI5LVQa3tnz0zyS5z1uzMlcptx4HpBdp8rMxAN iv629T4hsSJZwWPU7St7zkHAOzjAv0ylNI9eQr4ZJ+9HUJMTAQQaiG85Uxet2hH1 DaCIte9RDrj+uPPEKpi801RKzKrSaqXH5fv4M7HntttRbvUQ1Lzt4exoMQYPdfdN T9v0lgttdgZ/DdTZlvPcrU1qApPIonDdljLAOMuLPPHHOihlraQ0ITaynhEUy6ty BcDTGncoa6nWG4cZcimsj/YXWgbemG5QcD5acrW7zgH3uYZDJGl5TGzm2GLTmx9D pg3Ya/reLYJFZD8V8Yz0m5gNXbv7bc+4JZO/2lBigomEczKrt8M= =sVip -----END PGP SIGNATURE----- --IJbOhn5aoWaypdQd--