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 1jMCie-0002DF-8o for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Apr 2020 15:34:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jMCid-0000Sz-38 for pgsql-bugs@arkaria.postgresql.org; Wed, 08 Apr 2020 15:34:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMCic-0000Ss-T4 for pgsql-bugs@lists.postgresql.org; Wed, 08 Apr 2020 15:34:22 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMCia-0002FD-Ap for pgsql-bugs@lists.postgresql.org; Wed, 08 Apr 2020 15:34:22 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 038FYHDY029777; Wed, 8 Apr 2020 11:34:17 -0400 From: Tom Lane To: Hamid Akhtar cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #16346: pg_upgrade fails on a trigger with a comment In-reply-to: References: <16346-6210ad7a0ea81be1@postgresql.org> Comments: In-reply-to Hamid Akhtar message dated "Wed, 08 Apr 2020 12:21:32 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <29775.1586360057.1@sss.pgh.pa.us> Date: Wed, 08 Apr 2020 11:34:17 -0400 Message-ID: <29776.1586360057@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hamid Akhtar writes: > To recap, the attached patch moves restoration of comments to the > RESTORE_PASS_POST_ACL. This ensures that comments are > restored in a PASS when essentially all required objects are created > including event triggers and materialized views (and any other db > objects). This is surely not a good idea as it stands, because it delays restore of *all* object comments to the very end. That's not nice for parallel restores, and it also has large impact on pg_dump's behavior in cases that have nothing to do with event triggers; which could cause unforeseen problems. The right way is to postpone only event trigger comments. I fixed it that way and pushed it. regards, tom lane