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 1hksIt-0004TD-K7 for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jul 2019 15:45:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hksIr-0001UD-GT for pgsql-bugs@arkaria.postgresql.org; Tue, 09 Jul 2019 15:45:13 +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 1hksIr-0001Qg-8Y for pgsql-bugs@lists.postgresql.org; Tue, 09 Jul 2019 15:45:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hksIj-0008O9-EM for pgsql-bugs@lists.postgresql.org; Tue, 09 Jul 2019 15:45:11 +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 x69Fj2gk024824; Tue, 9 Jul 2019 11:45:02 -0400 From: Tom Lane To: Jason Madden cc: Thomas Munro , PostgreSQL mailing lists Subject: Re: BUG #15720: `executor could not find named tuplestore ABC` in AFTER DELETE trigger referencing OLD TABLE as ABC In-reply-to: <27B30574-291E-4C33-B89F-B690FB6CA492@nextthought.com> References: <15720-38c2b29e5d720187@postgresql.org> <27B30574-291E-4C33-B89F-B690FB6CA492@nextthought.com> Comments: In-reply-to Jason Madden message dated "Fri, 29 Mar 2019 07:42:38 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24822.1562687102.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 09 Jul 2019 11:45:02 -0400 Message-ID: <24823.1562687102@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Jason Madden writes: > I hope that at least begins to answer your question. Thanks for thinking= about this! FYI, we're now thinking that the problem here is unrelated to partitions but instead is a bug in EPQ, which is a subsystem that's entered only when a row to be locked/updated is found to have just been updated by some concurrent transaction. See https://www.postgresql.org/message-id/flat/15900-bc482754fe8d7415%40postgr= esql.org If you're in a position to build a custom version of Postgres, you might try whether the patch proposed in that thread resolves your problem. regards, tom lane