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 1lrnoV-00066T-0G for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jun 2021 20:31:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lrnoU-0006xo-0o for pgsql-bugs@arkaria.postgresql.org; Fri, 11 Jun 2021 20:31:34 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrnoT-0006xg-Qj for pgsql-bugs@lists.postgresql.org; Fri, 11 Jun 2021 20:31:33 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lrnoR-0004je-QM for pgsql-bugs@lists.postgresql.org; Fri, 11 Jun 2021 20:31:32 +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 15BKVTnS2061772; Fri, 11 Jun 2021 16:31:29 -0400 From: Tom Lane To: sbernikov@gmail.com cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17054: Memory corruption in logical replication worker when replicating into partitioned table In-reply-to: <1819098.1623369807@sss.pgh.pa.us> References: <17054-637193af919f0024@postgresql.org> <1819098.1623369807@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 10 Jun 2021 20:03:27 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2061770.1623443489.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 11 Jun 2021 16:31:29 -0400 Message-ID: <2061771.1623443489@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk I wrote: > PG Bug reporting form writes: >> When logical replication target is a partitioned table then execution o= f any >> DDL on source table leads to crash of target (subscriber) server. > Thanks for the report! I duplicated the crash on v13 branch tip, I can't reproduce this anymore after commit b270713fd. I think it's probably the same thing I found while making a test for your other report: logicalrep_partition_open() failed to ensure that the LogicalRepPartMapEntry it built for a partition was fully independent of that for the partition root, leading to trouble if the root entry was later freed or rebuilt. My failure to see a crash on HEAD was probably an accidental issue of memory reuse patterns. regards, tom lane