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 1hJSjh-0003b1-O9 for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Apr 2019 00:59:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hJSjg-0002Fn-3m for pgsql-bugs@arkaria.postgresql.org; Thu, 25 Apr 2019 00:59:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJSjf-0002Fg-Qc for pgsql-bugs@lists.postgresql.org; Thu, 25 Apr 2019 00:59:35 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hJSjd-0000Pz-ED for pgsql-bugs@lists.postgresql.org; Thu, 25 Apr 2019 00:59:35 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 13D8776E; Wed, 24 Apr 2019 20:59:31 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 24 Apr 2019 20:59:31 -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=/1knTFw0huVY0Tca7nXK+6wCnM6 +hvsh/LRfrBuzUzY=; b=QZntdH7HARqlOkaPnZ6xjg4366iXNH3XqsCzN40qHsQ E7SPjVMHsPx5WT0oEA2/BPEkMyy+/THunnRIvK33ddc/XKWFUq60oRlIkFMskB6M lU4fkJJ4OMW+EX4qgoQJRDlH/4SRHgzlfWI2QkVjFP+KGIAbyJkcT3C1QNBPHETJ Lg21t2qGgq8eKuy3yR2d9kObtz18rd60MMkhPNacn0lS50uYSrkJnXl3m/Rr5cY4 o3LH/amSlaqSgwCLrnW1Ty1frmuDchRG7Hh5KF7Z2PtCmlGFAu/j+Z8MQOTN/ehc KCNJv1hLwcatAyBTOQ291M4UptxzgVcYsKhcuceTUaQ== 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=/1knTF w0huVY0Tca7nXK+6wCnM6+hvsh/LRfrBuzUzY=; b=Bh15K6ibnSYEsecpyiz2FO a4ujaCZEzCY1kRfRu931Nc9fF0FmRzDC6r6l6bWyQ44WujaeTElu+vgQfZqquY9L nmuqSqAbDiAeQaX+XxqgQETtxWOafJohz6oCIviJvmCIQsK/WYn5Tx7D8WtxEWLW ClIIxr1nDGaD4RMYyndis/0c9+GrXUF+bBY00bp3ra4VAnybCK2P2hqvWCcHgfIp sQStM7XHx8KjMWN2wI0aa77YCLoMLrHw/KKzNEmdhmDzroy5saRGvi+EkJev6/w5 WTTQ1Jq2U0q/O/q691boEDYl+e4R0mvGjINZR0V6vr3CT1uVYQFzuP9ePFvpcveg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrheefgdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredttddv necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecukfhppeduuddurddutddvrddukedtrddukeehnecurfgrrhgr mhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiinecuvehluh hsthgvrhfuihiivgepud 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 0A45F103D5; Wed, 24 Apr 2019 20:59:27 -0400 (EDT) Date: Thu, 25 Apr 2019 09:59:24 +0900 From: Michael Paquier To: Peter Eisentraut Cc: Tom Lane , 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: <20190425005924.GF8552@paquier.xyz> References: <043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com> <31358.1549981670@sss.pgh.pa.us> <20190213023817.GD5746@paquier.xyz> <20190213044104.GE5746@paquier.xyz> <12a993ea-1ba5-96d7-a0b5-362579fdadc1@2ndquadrant.com> <20190309013557.GF9266@paquier.xyz> <20190312034630.GH13812@paquier.xyz> <20190326024527.GS2558@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="f61P+fpdnY2FZS1u" Content-Disposition: inline In-Reply-To: <20190326024527.GS2558@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --f61P+fpdnY2FZS1u Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Peter, On Tue, Mar 26, 2019 at 11:45:27AM +0900, Michael Paquier wrote: > On Wed, Mar 13, 2019 at 10:28:11AM +0100, Peter Eisentraut wrote: >> /* Need CCI between commands */ >> - if (lnext(l) !=3D NULL) >> CommandCounterIncrement(); >=20 > Hmm. We could actually live with this suggestion, and this impacts > only CREATE TABLE and ALTER TABLE statements. I would still add a CCI > after the internal dependency between the identity sequence and its > root table is recorded though as there could be other callers of the > internal sequence API, so a CCI only in utility.c may not be enough. Is there something else you are considering for this patch? This previous suggestion looks fine to live with, at least for me. Tom, perhaps you have some extra input on the matter and would prefer a more restrictive location for the CCI? >> I think we should also make the implicitly created sequence temporary. >> Even though the permanent sequence is cleaned up properly, we should >> avoid having those sequences write to the WAL. >=20 > Indeed, sounds good to me. This is at least v13 material, so I would suggest to discard this item for now. -- Michael --f61P+fpdnY2FZS1u Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlzBBmwACgkQnvQgOdby QH2eOA/9FZy2zrLBZr7Eejo4Mjs0FakG08udjNd1zTKmNdCYlQz05cN8E1hmBFKn x7+aPVylzMv0eitRUwgtyzvT4TWhFbbqRg1tIyRN34S3ZC6qdlk/jn4a6bvHOgxR dJfBoWLtqZF8o+w3j08SWq5cKcHkn4Rb0AMspv9JsewmGZ71P9VF4osTvg9gJRl9 ZY3zlCnhdmDP7viogqZEc+kG3De1+ohSIisqoJESjNqZGNK2aRHgdlx93/DAf7qY ZSgAScIS02Ii3yv8HwKqw9+jdJyYK1oCQKLpvqCRfop6VqJegznVfdVCekzJKA5t xaAyvC2YWqfnDcoOGaGOSHdX/Fl7HmrwoptrvrY6W29q/D72zSwMU+AhVl28xMrV yHnoFCylJXeEu4K7FETbs7GmTGIvtyNWLDff5npVp3ZmHY/rycehXXQPccqlqPHv 3IK7HC8yZ8wQZVpHUuEDDAnZ+T/wycjSohX0m8xj510asfDoE+hcdwBs9MfaJ/2S zewHSwsG2YnVuMWqQ4MAAT5AwbiWSpVq+05xPNMl9qZ8GpFpBpAIrNt8STCFUUqD CVWTmQsW1saAGQtsN6Fu/hcWPrZ3e7AkJyRVwiXarsxszBWrmBzUNv6qYliLeLTJ LdBxQQFfuDQuvdlndOx0JFESypRecmiiGQeFFsm2UzZ9dW/kv4U= =Oos1 -----END PGP SIGNATURE----- --f61P+fpdnY2FZS1u--