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 1jfvn2-0007sr-Gc for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2020 01:32:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jfvmz-0002ak-8p for pgsql-bugs@arkaria.postgresql.org; Tue, 02 Jun 2020 01:32:25 +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 1jfvmy-0002ad-8s for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2020 01:32:25 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jfvmr-0001xx-P8 for pgsql-bugs@lists.postgresql.org; Tue, 02 Jun 2020 01:32:23 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 63C075C0039; Mon, 1 Jun 2020 21:32:16 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 01 Jun 2020 21:32:16 -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=fm1; bh=75nv3pbKlwKBq2N5fMV7nfb+0Lq //7R+UXkshYu4C7Y=; b=Afyh4gRiiAEnKQcn/4jMfehRka+PxUR0Le4HgSmH7Nv Kpy0JvjJvqKMscjR3iLg8X4Ht/GxgcROTfFHCg+2lsdDzCABxyA4QRbk9kPZa33X wB5xLCPg13VTnJTazv/gMK+4WKK4oqws/kUQfrF5FbG1mpZpxAPgmF7URpT8UItH rx7wjrdGvaIRWyGnEKxCA/zE85xnfsDnBbaX7MFb2agjrki7vy59MDIFMJMTQzOQ cBIvH0QCrKmqsvZCNKRRpsqV+qrEJVWTXLuNq688AaZ73APvgPy3RXa56rsUnm+Y dYcrQ1kX90HO41NBIYrmwCQw3VdPYQMmKG8Qvr7L+RQ== 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=fm2; bh=75nv3p bKlwKBq2N5fMV7nfb+0Lq//7R+UXkshYu4C7Y=; b=ccJZP2roN/O8vwW34X+9VF cLvWec67859+28p8MRIbNBeQQ22kMwtllA7oCktfo+7PXAxlL0049+JQTXaSog/x WgFbT36iuyvDhSbIXXNFnUHPLffRaqxGMf3/Gpp99Ngwspv3vcU7T9xsPICxgPkP uBOPBlvNawunbKsKYvb3i4P16AZtK/KFVbg/SCRvPLc/0aB9f8XuSE1fHuo3w6Pk tqRHBT/dQKyiE09mvRjgCzsezzuU71wiBBWk30XWVxoOYNkrd7bmN0bPoJe6d+Dp 2IopPQu+erlaFlOAXfl3Ja1zNXEAk2LXM03lpvz5c6cy+24PShyzssBeQtXYenkw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefiedggeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt jeenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeevfefgueegvdejfeejffekhfef teekledvgedvfeegfedujeeutdekheeigfelueenucfkphepudduuddruddtvddrudektd drudekheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 1FEA5328005E; Mon, 1 Jun 2020 21:32:13 -0400 (EDT) Date: Tue, 2 Jun 2020 10:32:10 +0900 From: Michael Paquier To: Andrey Klychkov Cc: Peter Eisentraut , pgsql-bugs@lists.postgresql.org, Tom Lane Subject: Re: Message-ID: <20200602013210.GA3346@paquier.xyz> References: <1590486572.205117372@f500.i.mail.ru> <9918.1590758278@sss.pgh.pa.us> <20200531015134.GK44192@paquier.xyz> <1591022345.482379838@f739.i.mail.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SLDf9lqlvOQaIe6s" Content-Disposition: inline In-Reply-To: <1591022345.482379838@f739.i.mail.ru> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --SLDf9lqlvOQaIe6s Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 01, 2020 at 05:39:05PM +0300, Andrey Klychkov wrote: > I=E2=80=99ve seen on the internet people ask each other about this (when i > was searching the same not seeing that in the documentation). Note that indexes and tables can be schema-qualified in a REINDEX query, so you would need a bit more than the query above, still you could just wrap that in a plpgsql function that scans pg_class and pg_index, and issues a set of DROP INDEX commands on each entry. I have been wondering as well in the past about adding a set of SQL queries to be able to do the work in a database as if you run into this issue repeatedly it is annoying. So we could add that on the reindex page close to the paragraph about the drop of invalid indexes. -- Michael --SLDf9lqlvOQaIe6s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl7VrBoACgkQnvQgOdby QH0BORAAp21eMrqfj7tZxmoSVJ+SbyrMTjl/xlwxaNPmOAL3VJ78DNfXPpYaY1jf ZS3PXzBTVi7K861JQNtfkYNkEbsYxMq479OQinjVv8tTRMSg8z7luWg40REt6wxg oyMWElvsA0RAoqK6B26tRi9fD1yvesf3P4RAVrBDfytqVfZfyMtTZGZSqPmtllel o+JM+1YqiQzzcsaKiyVtAAajxMJco2YJ7GS2QcYy5mQsVNEzFSmDulvXvy+/90Dt a/wZ3QG88fPoYWz3Yp4XF9sDTBiaR98sK0NuM5uF5RZrn7ZiGCREvjXC3eabVfp9 mauaPSXBBZaqClhBHypOn0R5AV4WnQdYiF+zAEvjPxHKSRH4j3fM6zh7CRxRf0CX 05yUcarU7exzUfaPsZTcHCgLA7PfqjDDaNVlP/VTxFVNLPT3LBqU0UEnuuSXAqTR 2APUHvMcHOK0n/limAJEDOk8lYT5D1rwk3ercBO/jDWcxg/FY6YvhM2ZE2WhpBmj 4bWn+Vv05oiqaJrbd0gpn0sC2OFbUhbzPg1Gte5gSFvN+DOZrGCT6fBJ/oZLQzU7 1VW+EbZlT1GTbRtIClzEbjq6FH8TnMmmnfEUq5WF7Tc+7184PnXuN2f3JLZCVuE9 S8f7feadsb2KkWCoJVu2aKPo99JYy1i3Ml+RAyzCddDLF7Ruw7E= =loN6 -----END PGP SIGNATURE----- --SLDf9lqlvOQaIe6s--