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 1pItX2-0000Nq-UM for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jan 2023 15:42:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pItX0-0005hw-5i for pgsql-bugs@arkaria.postgresql.org; Fri, 20 Jan 2023 15:42:18 +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 1pItWz-0005hf-UC for pgsql-bugs@lists.postgresql.org; Fri, 20 Jan 2023 15:42:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pItWv-0003lg-9u for pgsql-bugs@lists.postgresql.org; Fri, 20 Jan 2023 15:42:17 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 30KFgAhc429828; Fri, 20 Jan 2023 10:42:10 -0500 From: Tom Lane To: sergey.belyashov@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17756: Invalid replica indentity set order in a dump In-reply-to: <17756-dd50e8e0c8dd4a40@postgresql.org> References: <17756-dd50e8e0c8dd4a40@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Fri, 20 Jan 2023 13:41:07 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <429826.1674229330.1@sss.pgh.pa.us> Date: Fri, 20 Jan 2023 10:42:10 -0500 Message-ID: <429827.1674229330@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > Some database have a partitioned table with unique index used as REPLICA > IDENTITY. pg_dump places ALTER TABLE tbl REPLICA IDENTITY USING INDEX > some_idx after partial index creation. But Postgresql fails to restore such > dump because replica identity cannot be set on invalid index some_idx: > partition indices are not created. Please provide a concrete example, preferably a SQL script to create a database that triggers the problem. There are enough variables here that nobody is likely to be excited about trying to reverse- engineer a test case from only this amount of detail. regards, tom lane