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 1gtkRT-0001d3-Vt for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Feb 2019 02:38:32 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtkRR-0002F6-2D for pgsql-bugs@arkaria.postgresql.org; Wed, 13 Feb 2019 02:38:29 +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 1gtkRQ-0002Ez-6H for pgsql-bugs@lists.postgresql.org; Wed, 13 Feb 2019 02:38:28 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gtkRN-00020w-C5 for pgsql-bugs@lists.postgresql.org; Wed, 13 Feb 2019 02:38:27 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id A8BBB32C4; Tue, 12 Feb 2019 21:38:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Tue, 12 Feb 2019 21:38:23 -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=TAjjhHXF+hqnsxs/j/g/y9w0BHo t24nvAXl4blMWFuo=; b=dEVuOKIzEQKRHAU5YvPaFONeV14YXFPBOryKMw8mhAZ lPWgO0e0S+kQxuljvBv59QE/mpkiNQfqV6wXEEwT7VzILzZ6DHmChLcVq3oYF8Yj 22PUDkfBBuNIk9z9iKbvobPV6XkrukHGFxfl9SoZuqzaM8W9trqCUBWRlF5gIwqw 2A4pwfJeLyiR7yS+KuaOGvLDDrtfMDuYAeMGURR6uYH5zCbTgGQCwUM6oQ/K/md+ 6ALsImK94VA/+GihBFvGjRcwCR4+eUADG73qfg22lFuwysLaBRYxNpmWGF7335YS eQiXCAAnBPdNO97P2ZtI97fUq+w2qWiuifNFkwVeRWw== 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=TAjjhH XF+hqnsxs/j/g/y9w0BHot24nvAXl4blMWFuo=; b=hcfUvjp0LJ7fKdCSmeXPTd VC0zAFrxVC8CLm2GRHNfaNDuRb6JOOLYOcbWotQsckaR7855B7ODDQtUaQvli0m0 s+0speKAJi8kE4J6t+kQ3WOsjGZ3vfoy9BVfQJOgeEQ0TYyXdOHEUBF3IZ9YiGFX BrADbQbldIJuohRihzh6luMX06CHllV7imv9enR7JFgvJkn20pLhK8kKhJwa/KDX JK9Q/q/A4pUn4ourjQjYCc+A6bU49DJP8/XDGLC76VC6MjA32EHcDDhNEd8tzf0J FVEB0lKG0SYVgtveT5l1djWE90PG/Kmz08l1A62APgwTSk1ebVo56ZbZ6xRD5Qzw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtvddggeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdejtd dmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgt hhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqhhuihgvrhdrgiihiieqne cukfhppeeiuddrvdduhedrudefjedrudeivdenucfrrghrrghmpehmrghilhhfrhhomhep mhhitghhrggvlhesphgrqhhuihgvrhdrgiihiienucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp [61.215.137.162]) by mail.messagingengine.com (Postfix) with ESMTPA id 5FC3CE4667; Tue, 12 Feb 2019 21:38:20 -0500 (EST) Date: Wed, 13 Feb 2019 11:38:17 +0900 From: Michael Paquier To: Tom Lane Cc: Peter Eisentraut , dnsl48@gmail.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs Message-ID: <20190213023817.GD5746@paquier.xyz> References: <15631-188663b383e1e697@postgresql.org> <24188.1549917188@sss.pgh.pa.us> <043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com> <31358.1549981670@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="ZJcv+A0YCCLh2VIg" Content-Disposition: inline In-Reply-To: <31358.1549981670@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --ZJcv+A0YCCLh2VIg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Feb 12, 2019 at 09:27:50AM -0500, Tom Lane wrote: > Hm, I'd be more inclined to find where the sequence creation is happening > and add a CCI at the end, because that comports better with the general > plan for inserting CCIs. There may be other issues of this same sort with > doing-X-just-after-identity-sequence-creation if you don't fix it that > way. Agreed. I don't think that it is the correct logic to put an after-the-fact CCI just before executing any drop or truncate actions. It should happen after the creation of the new object so as it becomes correctly visible within the transaction. -- Michael --ZJcv+A0YCCLh2VIg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlxjgxkACgkQnvQgOdby QH1owRAApeFdiZa7sVYv60tjUj9p96NCvt6i6oOkMYryypYRteMO5awdywZD+5zC Foh3oavGVPzeaL/xKGHhXayJQUNdAmrJ4bNhfZoTRGnuGVabN7I4pCfAgEN3r+b+ 7V8VIS92A3QeTE+5aQ94iKRhhc1EO69nYxaN6qsc/3G88j6D/yO8HSgH5fj8TNA1 0GngMX2jdccAtPdeC9sYJNmLDfkt2TqxBqpAXfARMYcxUK1etOJY1qNy+bRxWPzL xLB1+2QGfe1seUjeN5mtzBPSqhHZZiRDALZhKv1aBsB87KNQ1+Xs9NwvCOpd1IbZ r6fwHTQt3vSZmmwR84Ot8N/9BLkhaikY8PWmLlZyFoBOGfhfuI1WqSU+fOZyZFnj 4K/liKBx/485wBr/hEOB8aBe9zeDprODpkXFkh4sIweHuT4An9Gul212W103Sgux DF+joAgWXPAxfx29EVhcPv9M08ShliPGpZ9vv+QyM7G3UUeFQGNY+Dvm6JHnmTNU 6YALx2XRY3XRfeAYxIYSHan/8jaqwtP+YH96AWT/+s1nZvfRW5d5m5Mtrbv4IwJC nUEtCxuSYR0AektUtYuf+7ePWBYke0k8OJx5Lp8X//stPA3fia7EQewQP5LFyfEP /5cAvScSvCRcaWkZF6qV0iCFwyrFwzcgVKP4wHUqxRgM9gxkokY= =EDkM -----END PGP SIGNATURE----- --ZJcv+A0YCCLh2VIg--