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 1iVRcd-000472-N8 for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Nov 2019 02:46:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iVRcb-0006Kr-CT for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Nov 2019 02:46:05 +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 1iVRcZ-0006Kd-KP for pgsql-bugs@lists.postgresql.org; Fri, 15 Nov 2019 02:46:05 +0000 Received: from [64.147.123.24] (helo=wout1-smtp.messagingengine.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iVRc1-0008JG-6Z for pgsql-bugs@lists.postgresql.org; Fri, 15 Nov 2019 02:46:02 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id D591053E; Thu, 14 Nov 2019 21:45:17 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Thu, 14 Nov 2019 21:45:18 -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=Mi79+AXBBmYVhfG5mOgwrrGBEgX Fmh9ddA3t3OYtD3k=; b=LM1INdLhR1es11t9yRL3ea5bLVYFXt1F8yBMJev4/1K KmccWi42fLCMEUgcB2vzmXOXTWRn43w5JDvqj60RjSGWw54aJO6jeWhFhdHxA9ci wconZOlcNHlOm1igBJJWjDq3B3s2xjxjtcj+IV3s0s9jM4OXgTflprHUvjKfHc5q mC/xO3uUtYRW5fVWuBzYPuMtn6nmhWKRWqTB3VVkEeMBaqnW491q6k+gfSzxmADG vqMAE9aEv4eDkEGJWhuwXehWcGaEZlonHL8LELz+7EGYRSUy5HYp+UlYjSumCEaG mSAA9vaGd/1JlrJU1Y4WhZGYcmIOO/Gjy0lbXZedCBA== 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=Mi79+A XBBmYVhfG5mOgwrrGBEgXFmh9ddA3t3OYtD3k=; b=rwg6xmP0BwUQVGQDS51IE9 UFn5GTNYUThP+yhZ/tRuZFBH/eG+sWXhuUo2iBZYo6jWAMQUIXMOYQV63vWud9nu TST30fr3ssfkABbYE7lXftDmWxjMjzm6MyHQpIDsGq7/yEhvWBywYcwwzfDOlUaw BcFHZqx9CkSt+gYbO0AQ/gcl0j3cyhLEB9IKr5QrcIjaF7fJaYn8vPM+IBazU5wX z40AmPSMJDxgt5qPa/Hue9Bi5QdE6jfVor2tAGNPw/s3jelmXKYpASQndPt/OCtF 65u1Jef5jtbArBBJMRDDEz3pyNhoXNH7x7FfZHEaIOTJOHs99rFt2bJEXwoX+fbA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudefgedggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepuddukedrvdeguddrvdegledrkedvnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgeptd X-ME-Proxy: Received: from paquier.xyz (mp76f1f952.ap.nuro.jp [118.241.249.82]) by mail.messagingengine.com (Postfix) with ESMTPA id AFA6A3060061; Thu, 14 Nov 2019 21:45:15 -0500 (EST) Date: Fri, 15 Nov 2019 11:45:12 +0900 From: Michael Paquier To: Tom Lane Cc: Andres Freund , Manuel Rigger , PostgreSQL mailing lists Subject: Re: REINDEX CONCURRENTLY unexpectedly fails Message-ID: <20191115024512.GE1849@paquier.xyz> References: <20191113154837.mgz2rnl6d7k6tas7@alap3.anarazel.de> <12383.1573660748@sss.pgh.pa.us> <20191113163851.e2enkdpvd3nrobst@alap3.anarazel.de> <19198.1573663534@sss.pgh.pa.us> <20191114080855.GG1910@paquier.xyz> <3808.1573754033@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ey/N+yb7u/X9mFhi" Content-Disposition: inline In-Reply-To: <3808.1573754033@sss.pgh.pa.us> X-Host-Lookup-Failed: Reverse DNS lookup failed for 64.147.123.24 (deferred) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --ey/N+yb7u/X9mFhi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Nov 14, 2019 at 12:53:53PM -0500, Tom Lane wrote: > I don't find that very convincing. If there's a reason to throw > error for global temporary tables, let's do it for that case, > but that's no reason to make the user-visible behavior overcomplex > for other cases. It might well be that we can handle global temp > tables the same way anyway (ie, just do a not-CONCURRENTLY reindex > on the session's private instance of the table). Well, there is also the argument of consistency. What should we do if trying to reindex concurrently a database or a schema and that the database or the schema include both temporary and non-temporary tables? We cannot ignore CONCURRENTLY in this case for all the relations if there is at least one temporary table. It could be as well surprising to skip only a portion of temporary relations (these with on-commit actions and issue a WARNING for each one of them, still that would be more consistent with the treatment we do for system catalogs in ReindexMultipleTables(). An extra solution I can think of is to not skip temporary tables with on-commit actions, but just fallback to the non-concurrent path in ReindexMultipleTables when reindexing each relation for any temporary tables processed (all of them, and not just these with on-commit actions actually). Thoughts? -- Michael --ey/N+yb7u/X9mFhi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl3OETgACgkQnvQgOdby QH0JOA//dFrcRS65x4ZVacibsRINhsjLi0mh1YyeYH9bh03mMwHBNK8MmIXVPv/s uGME/FDTmzVjyPyMhsWUJ4wKGssLgZ2B6n9ERKXi7+Z8fxlrNXF76ZGXicWZunT9 673/nGzF7+3ktywRmOdUt6hGoUVqRLkQUuCGXB62Y/+wWpOPgjBQ6hyTQN52f8ff ErP9Pl1NQqBGbelrdfpmUdKtkC/pJWWD5GJmw6PXKtNqB4AV/Hsr54MFIWXWEW3x G88flSjH7gnS9GR48j7Zt6t3XoPKKo1AMB/a/s+aEKkCjRD1wSh/1mh5PmwsXHEh 6Z5n8vIyrNKLoSZ1PtmWHSGP2bB8irZOwYU+ShY7tuw6Gk5h+pdtwJgipald87ag OFyxrSbpERrLe7cjomnJrScKXnFT4+v6XWegF0CP3kCIj7R0tejOZ1YQ89eHTdfc ObyF2DSk1mOFwxUiSaaFCA1VmOb4a3rKay6mSo/piiNI5TKmiHQBq5WgsHD49b4f pjaxRffI1qNmuRcv5f/sqUtEAqeEEK5SergXfWhk17oziWBdmTsH8yXE3H2/Bxvd IlR6gOqxA1u5isRekSQR4M30+imUP7WLOjiUuNEuJ1GGWWivOa/Lp/2Jg2R2+ylf NmDnWQvZUnqgZ+D1AUtmA8yjEW6bkYH6bKmjgtjf3bicsb4Cylk= =fCo5 -----END PGP SIGNATURE----- --ey/N+yb7u/X9mFhi--