Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tk8BN-000OpR-8p for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2025 20:57:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tk8BL-00373P-Fx for pgsql-bugs@arkaria.postgresql.org; Mon, 17 Feb 2025 20:57:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tk8BL-003739-72 for pgsql-bugs@lists.postgresql.org; Mon, 17 Feb 2025 20:57:35 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tk8BJ-001QK7-0F for pgsql-bugs@lists.postgresql.org; Mon, 17 Feb 2025 20:57:34 +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 51HKvUxX917263; Mon, 17 Feb 2025 15:57:30 -0500 From: Tom Lane To: Sergey Belyashov cc: Tomas Vondra , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18815: Logical replication worker Segmentation fault In-reply-to: <911898.1739823180@sss.pgh.pa.us> References: <18815-2a0407cc7f40b327@postgresql.org> <832225.1739810351@sss.pgh.pa.us> <906545.1739821437@sss.pgh.pa.us> <911898.1739823180@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 17 Feb 2025 15:13:00 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <917261.1739825850.1@sss.pgh.pa.us> Date: Mon, 17 Feb 2025 15:57:30 -0500 Message-ID: <917262.1739825850@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Further to this ... I'd still really like to have a reproducer. While brininsertcleanup is clearly being less robust than it should be, I now suspect that there is another bug somewhere further down the call stack. We're getting to this point via ExecCloseIndices, and that should be paired with ExecOpenIndices, and that would have created a fresh IndexInfo. So it looks a lot like some path in a logrep worker is able to call ExecCloseIndices twice on the same working data. That would probably lead to a "releasing a lock you don't own" error if we weren't hitting this crash first. regards, tom lane