Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWuG3-000Nuz-Cs for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jul 2024 08:55:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sWuG1-00Cxma-NS for pgsql-hackers@arkaria.postgresql.org; Thu, 25 Jul 2024 08:55:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWuG0-00CxmS-Pb for pgsql-hackers@lists.postgresql.org; Thu, 25 Jul 2024 08:55:29 +0000 Received: from fhigh8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sWuFx-001N16-KW for pgsql-hackers@lists.postgresql.org; Thu, 25 Jul 2024 08:55:28 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id 03FC01140204; Thu, 25 Jul 2024 04:55:23 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 25 Jul 2024 04:55:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1721897723; x=1721984123; bh=rN4wKXOnRv tmi7+0GBXOhYxL++SsQOii9JdRo+3+F/s=; b=aIaqucU6Cpxz8mAmRZ9iPhhCSj JzeIA7tRlT9inY4cQvwH5LUhFk8IS3fOpXm54NSLfVHPmr0amPCfqV1GHIUTmfae xz0bpz4zMWXHntx8XavH0ajv6C/mYtcroR5ODOCEcX1gMR/P4wVghyIvqC7tmmbF 6y0D8kcbA+LCEV67cv+ka3xiP0bzTP7Ey5rCEgZux1x0jyZm9CJEr1d/L1XkBpZz y/ks7+HBG7WFf/MjbpVbWvRDmQ5Kol0l0nS4fEN+x0YiZIKKeP5FOPzZd/GokaLi ewXg9q0fPvHt82sXYyrdJqsu8EgW5YM+kPWqeho/JXVhO0EgtMwKGImNCgJA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1721897723; x=1721984123; bh=rN4wKXOnRvtmi7+0GBXOhYxL++Ss QOii9JdRo+3+F/s=; b=a9MF+SGl5Yz/rcuPUGOMAhOLTbaoSQ4EL4pzAtN5uNar mqWLXMVaxrM8MNd+1oOsgmEzx8FX7i5hdvYmOjF4ZClKcvWJlYDM/dIfjnbQ4uVm T2W0p/R3VsjKlr0eZ1CkQE18FM+1s5YvaJqNOl1h8FUsTAgm36VGjYdfWhkHzCkE sza9ds+6+X0BnMZOcimM0eeHJnZBv6zfUdcf8OPIdfE7mUDaShHw+9XJqNS5tGD/ 7FU7lg8hJtjp7wZ7h4OMn3VwcKrYHn6BU66j08CxuyHzTg6zmjJVaonoDufnYxPZ igaFB/QTw7ind3cZfYUcnOCSrz/XkSOG/UgvdFKMdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrieefgddutdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii pdhnsggprhgtphhtthhopedt X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jul 2024 04:55:21 -0400 (EDT) Date: Thu, 25 Jul 2024 17:55:19 +0900 From: Michael Paquier To: Ilya Gladyshev Cc: pgsql-hackers@lists.postgresql.org Subject: Re: REINDEX not updating partition progress Message-ID: References: <779baf7f-6fc7-4431-a08e-eec63d84c6a3@gmail.com> <18D00CB1-D34B-4B71-AC65-96F27D69A9D8@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9RR6zJQ25pab3bss" Content-Disposition: inline In-Reply-To: <18D00CB1-D34B-4B71-AC65-96F27D69A9D8@gmail.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --9RR6zJQ25pab3bss Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Jul 21, 2024 at 11:41:43AM +0100, Ilya Gladyshev wrote: > Forgot to update partition_relid in reindex_index in the second patch. Fixed in attachment. relid oid - OID of the table on which the index is being created. + OID of the table on which the command was run. Hmm. I am not sure if we really need to change the definition of this field, because it can have the same meaning when using a REINDEX on a partitioned table, pointing to the parent table (the partition) of the index currently rebuilt. Hence, rather than a partition_relid, could a partitioned_relid reflect better the situation, set only when issuing a REINDEX on a partitioned relation? + if (relkind == RELKIND_PARTITIONED_INDEX) + { + heapId = IndexGetRelation(relid, true); + } Shouldn't we report the partitioned index OID rather than its parent table when running a REINDEX on a partitioned index? -- Michael --9RR6zJQ25pab3bss Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmaiEvcACgkQnvQgOdby QH04dA//Xd8rV6F1Gcw+Wf5OEEqImiOQ3MqeOpqOn/VoFAonYhb+FZlMVGo0CFTl zoSw+TQ2omdp5w8tSv2Q3gVCipCeTA7a7O/0znf3IHNEit4UOQu9oRs4UZ2AxXDS zpqkgfIXCuu97u/5+IlUcI3OYvHm8f6+3eboDQGPKz9Hvw3/0aPSY1nnTRtWs1Ie NgL2Dqb1XntdGV87irrrxXATufobHSareDfa+8B0ClmeLHzVFlo+2EqUTBOmwr+8 tlwA47duaKCtlS1UftizolDR3fiZHSYsQ0HqTNE42t0ANA+Rknmq704xAHBCgg0d hHxcmW0vKLv5qJqJrgSSh0Tnq4bfrnthT3Ej7FTBUsVYguMTXrozbCe6824ryapB Vek5qzcPI6jtlExHyRfIrUJyBTW94lQ3Nf/nYH4sCuFxQOT1dmKQlFhMu7T7itBH +AgPQSDH65Vo2Dab7xxrWfWKNfc9JDgFgvt9WZrZ2obANuGEmf80gpF88tM6+jKO Sx23j06n7cY7et/L0e7QlNzecwaF7fZedTmJb1conTEi/x814NqhHgS65v5uFSaZ Z7DQd6axgiGDOc8d/W+qvyHtGT1jtoQx9Qy4qZa6Hlr3597jgAmcpG+7PJH2+awL E3X4c891KoMOKjmjxUtAIzVlOip5REcxcsjKD1siSQlbDtnfgIM= =juNy -----END PGP SIGNATURE----- --9RR6zJQ25pab3bss--