Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNSG5-00037u-50 for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Nov 2018 00:45:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gNSG3-00089P-Br for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Nov 2018 00:45:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNSG2-000823-Bd for pgsql-bugs@lists.postgresql.org; Fri, 16 Nov 2018 00:45:15 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gNSFz-0000aV-FN for pgsql-bugs@lists.postgresql.org; Fri, 16 Nov 2018 00:45:13 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B1CEB21FDA; Thu, 15 Nov 2018 19:45:10 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 15 Nov 2018 19:45:10 -0500 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=86SpRcvtOQzHGbxBQFl8jP82wS6 z7bjv7dZZrI4ApUw=; b=eHFnTX9z+aCqjOakRpABln3/K8wQKKnGSHqPVbLTqLB raGdhVcEn3ViIgZ7FkaSKbYcfIu1r5mPRoLZGFnT11HDHb71xQ2val9q/q+cmBe6 ocPGnNZSttRxyMEExTN6y0jbeWfGcPW2JaySgk3CP+uWjFI85MlusGoEOivlizUW TBdDBZf3GUDZzpNjvz78QJPqECdRhTXq2xJIEANliuYqtFhnZe5fF7Z9j5KnqMtV g7oPiLdVQpQwScjBMMsrDMdj74tQwXTVbZrqjKAHgt5Co8zccT23LUtsp+zFyEva Ln6r7GVeL5RPB3vsKF4yrKnpzwyoIzOlKWK5hHm21+g== 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=86SpRc vtOQzHGbxBQFl8jP82wS6z7bjv7dZZrI4ApUw=; b=jqdM2XbnYMj925rJpEJsah ++KGIGe14p8E5d2MBuLkNfwl1IX8ib2h7odmZJ4n/m70p3BvVHjeYVko3al3PQ1R T71o1dRqlD38FAkNfAxOVYMvRkCdp8mtv06D5iL1y/PPxa2O3XqWR9pQYNdLvFor rUSp5/pcMghZ4NGSZMh6SynHBYx/A4tjh46Rxzb/Qlb3rTyELshIqdjCPDeKS7T7 XcwQCKwU1jd49Xx0plmkE+ONUhY9JPNPZEkLo1YJT8LUk6tA58DnfpqfuJICG6Pl vECAiBBLRaU73Ow5WquKRbQvhZaBYDXAEESZP2tdQ5wMG1fu/jSlHJk7p812iVVQ == X-ME-Sender: X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D2CFE46B7; Thu, 15 Nov 2018 19:45:08 -0500 (EST) Date: Fri, 16 Nov 2018 09:45:05 +0900 From: Michael Paquier To: Adrien NAYRAT Cc: pgsql-bugs@lists.postgresql.org Subject: Re: ALTER INDEX ... ALTER COLUMN not present in dump Message-ID: <20181116004505.GC6613@paquier.xyz> References: <4498621542278682@iva3-0d9a30469759.qloud-c.yandex.net> <4847941542280801@iva7-4f557d6b60d4.qloud-c.yandex.net> <2b5f4be0-9a67-a5d7-4561-09871378a991@anayrat.info> <20181115224601.GB6613@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XMCwj5IQnwKtuyBG" Content-Disposition: inline In-Reply-To: <20181115224601.GB6613@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --XMCwj5IQnwKtuyBG Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Nov 16, 2018 at 07:46:01AM +0900, Michael Paquier wrote: > Yes, that's a bug, and something that we should try to fix in v11. Okay, here are my notes. We need to do a couple of things here: 1) Add a new join to pg_attribute in getIndexes(), then add the information for statistics and the associated column to IndxInfo after parsing the gathered array using parsePGArray(). 2) Add the extra ALTER INDEX commands to the queries creating the objects in dumpIndex(). 3) Add a test. A good thing is that when ALTER INDEX .. SET STATISTICS is applied on an index of a partitioned table, the statement is not cascaded to the existing partitions. We may want in the future to support ONLY and make the inheritance automatic. But that's another topic, and the fix for v11 should be chirurgical. -- Michael --XMCwj5IQnwKtuyBG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlvuExEACgkQnvQgOdby QH2xSBAAp+SZVHkVn96l3o0IvDfBasyh+ovpMmjY71f14NG4q78h6AwNJj43G5lG z6c9xKCJtbd/+RG/t9dJ1AVCy0AzgllzSivzdqkL3D/7R07GpiNy5aNAqHzcolNq v5EJHVturvKezkK8FHNQ3JlYpauTnF1vG4fDYLZY3uO6ckcGBSgjzpwD8Uc0JcBo r3dXBQH4sYiSbDIdgBhatb8tMjAkVVNz3FhItg+cp6l2PklEbGAsxg5IjeNDDXDr heNRZDJrA5Fw1wKJjaQ/qN+aLn67bQCqEh/gBxSfTW2z7TLJBQUaC1sMmZg4460z /0cAcbYpk9DfSj9GPRtjRWsU8heNbCTNfbNyW0baQoRj/Bu+eYwml+MMv7fp72Uc XqlAyQxhbJAEy4B3aua8iNrchUbmNwQ5Iyv0hqxOY/dl28ku6O1TZ/NusqS8eAt5 I1eeTpW0jD4FVckkomcIzxe7e7SlShYakI/8ft6hQjd4i8KMkOt4L1Y4ieBojcVC AmtW7OY23MOHZGbtxDCZph2wkm7ystZlSrciry23AEBsxLvNDhYckKbMq/AQhXp3 X3jeC2/Zvt1a/aaTFzP1qXuq1lrwwty5zMHhGRDLhLn2IIWotjrY2oiwcBYkL8Cd wuQ+B3c5b0UQs3pdefLtcjurAUizD+8CH3IC/dyTNsH5f/7gHCU= =C0rq -----END PGP SIGNATURE----- --XMCwj5IQnwKtuyBG--