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 1gYQpb-0001QO-Fh for pgsql-bugs@arkaria.postgresql.org; Sun, 16 Dec 2018 07:27:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gYQpZ-0004LG-5g for pgsql-bugs@arkaria.postgresql.org; Sun, 16 Dec 2018 07:27:17 +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 1gYQpY-0004L9-Vr for pgsql-bugs@lists.postgresql.org; Sun, 16 Dec 2018 07:27:17 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gYQpS-0007al-KF for pgsql-bugs@postgresql.org; Sun, 16 Dec 2018 07:27:16 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 2F2F221D12; Sun, 16 Dec 2018 02:27:09 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 16 Dec 2018 02:27:09 -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=19QN/G/7EtnqSKJvSoEBoHptkla FhZ8W/S+NYdxviww=; b=Uy2H8oXfsMdZ6KOAWSZvnppZUpClZAjmVCSff3w81cj u8sgQmt0rGkPtVX+kgTWqrpxWqdSOsTWKAMBgAJzguRy3/v6oZ3Y/DS4bCNvE1ka 3Zgt7Tj1CK8qOKI2xGuJ4mmkNMJ/QDoSqocOx3T0SbM4nJuwbXddD5mvWfqWMO54 ToMtzxNccAn97YY4YYqsEgJAbeAYch+Pi8KT7FokCZO7o0mLsO2gIn4INjSNyn4A os7qF0tj9U9D7n4RFNvx85B66y+lW6t54UqN09fBn7yfbk6X/iucr9KhFwmYcsji D3u/PnAqpe1QhROsko4zl9mP/9LJdcoin126wu9l9tQ== 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=19QN/G /7EtnqSKJvSoEBoHptklaFhZ8W/S+NYdxviww=; b=JtYrhIU1MVUxJLQFeIUQqt 22TQuxlCtKpmYGt4ZRyu7rXRD3993hYu58RGbYXZPWe3sOHaSFBu3yJO2ovZM+jA /14mEf+EnT/0G9w0c7wDbINmYWv2rZ/NnIQ6nbsY6uwa2Rp0RAVGEVvAN0TGjh8X H7NfNL7dqCaTedhlzBOnv1NByyOuVLKUTkpSxZt35pWrTsGxwAC5k1F+88zXZSTs 1UFJq79izk59kYRjmB5PLkk0yRI1SLPQyBT7u/NYBfQo7G0kJd3q9lvTHB/tRL5w 3oVnI3IuqNg+dtaR0i4t6OuiNqphA50PXIao/mGnvffj2qlTYJkuFij2Ln3FtEGQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtkedrudehkedgieekucetufdoteggodetrfdotf 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 68D6610086; Sun, 16 Dec 2018 02:27:06 -0500 (EST) Date: Sun, 16 Dec 2018 16:27:03 +0900 From: Michael Paquier To: Amit Langote Cc: Stuart , pgsql-bugs@postgresql.org Subject: Re: Errors creating partitioned tables from existing using (LIKE ) after renaming table constraints Message-ID: <20181216072703.GK5012@paquier.xyz> References: <2047094.V130LYfLq4@station53.ousa.org> <977c72a1-8d56-b77c-37de-808627033654@lab.ntt.co.jp> <20181214002038.GC2921@paquier.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GeDkoc8jIzHasOdk" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --GeDkoc8jIzHasOdk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Dec 14, 2018 at 11:19:16AM +0900, Amit Langote wrote: > Thank you for looking. I noticed that the previously posted patch doesn't > apply as is to branches before 11, so here are the patches that apply to > 9.4 to 10 branches. When renaming an attribute, renameatt_internal is in charge of invalidating the cache by using CacheInvalidateHeapTuple when running the catalog update in CatalogTupleUpdate. For constraint renames, we may finish by using RenameConstraintById or RenameRelationInternal. And here the constraint is removed by OID where a invalidation happens for the constraint, but not its parent relation. In short I agree with your fix and its position, still I think that we should add a comment why the invalidation needs to happen, with something simple, like "Invalidate relcache so as others can see the new constraint name". I'll try to get that committed tomorrow and back-patched appropriately. -- Michael --GeDkoc8jIzHasOdk Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlwV/kcACgkQnvQgOdby QH2x0A//elGATAipJ9mb57LsBBFtaqgkgYFnC/yhfJPDSpw82XCg0wFxpRm0gBn6 LMXC14QwQj4yUkSY35Q8FfmxziOZo7oady9sZuYEpOAJwfvndb2xOaDE220agZc8 pOhRy3dsu4d0nfF7OR/Ni4Mf5sU1G+p3d8JJr1FKZMwCgL2DB4iakB9S5AUBhPxr eC2x7JmsZsPYEX/lDQUhwi7nzcieNhn6f+4rArgAK2DC/2TAz7MsMKv9BxbRf27n CkQWRub2OXbrJL0EWwlNrxNCRO2FJPeIQf/dST+D6ePHZiXp1V7NabdjfxBJmS0i iASQMJfTVkAvINXOJ9vRpGM8CvqBLRgTtc+vIvI5wgMM7vQYa+Z4chlfb8ahJeuI Dl/YG6na3pCQ62YzFdTKjGxD6SA0ZajOO9ovingENP6bKeVyvOL3B3PqnK+CMdhi M1Mwsr+3VYMbGwRiceIHbdgH/2ohbqXowPG39qFOUan2f0gb4YqQHjT8/d+nUiDg KzLGJNgA2aYgab2zHgzq6K9vnNu9fhuZQM6qDc4UtdHnm7r+Qca/Bfv5oBBI0vRI 52P/PQ8RIyits0Q73QXLub5npznjPyZManInvNuG4QGyRh0rHWdFLy2+DQx7p8jv cxmHcNOI4wwie1NJCabHSEjxjsKakI6rv5kISIrWlIMU1uneRHM= =N6pN -----END PGP SIGNATURE----- --GeDkoc8jIzHasOdk--