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 1rnhDl-00EaSy-Nd for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Mar 2024 15:54:18 +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 1rnhDk-004uxO-C1 for pgsql-hackers@arkaria.postgresql.org; Fri, 22 Mar 2024 15:54:16 +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 1rnhAh-004sAS-O7 for pgsql-hackers@lists.postgresql.org; Fri, 22 Mar 2024 15:51:08 +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.94.2) (envelope-from ) id 1rnhAf-005vuW-BF for pgsql-hackers@lists.postgresql.org; Fri, 22 Mar 2024 15:51:07 +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 42MFp0xO920168; Fri, 22 Mar 2024 11:51:00 -0400 From: Tom Lane To: Robert Haas cc: Hao Zhang , Andres Freund , pgsql-hackers@lists.postgresql.org Subject: Re: [PATCH] plpython function causes server panic In-reply-to: References: <301509.1701479055@sss.pgh.pa.us> <307441.1701481871@sss.pgh.pa.us> <976744.1701813393@sss.pgh.pa.us> <3224351.1703872552@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 22 Mar 2024 11:39:43 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <920166.1711122660.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Fri, 22 Mar 2024 11:51:00 -0400 Message-ID: <920167.1711122660@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Fri, Dec 29, 2023 at 12:56 PM Tom Lane wrote: >> Here's a draft patch along this line. Basically the idea is that >> subtransactions used for error control are now legal in parallel >> mode (including in parallel workers) so long as they don't try to >> acquire their own XIDs. I had to clean up some error handling >> in xact.c, but really this is a pretty simple patch. > I agree with the general direction. A few comments: Thanks for looking at this! I was hoping you'd review it, because I thought there was a pretty significant chance that I'd missed some fundamental reason it couldn't work. I feel better now about it being worth pursuing. I consider the patch draft quality at this point: I didn't spend much effort on docs or comments, and none on test cases. I'll work on those issues and come back with a v2. regards, tom lane