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 1puib0-0004S5-8H for pgsql-hackers@arkaria.postgresql.org; Thu, 04 May 2023 23:42:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1puiay-0002KM-EU for pgsql-hackers@arkaria.postgresql.org; Thu, 04 May 2023 23:42:44 +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 1puiay-0002KD-5Y for pgsql-hackers@lists.postgresql.org; Thu, 04 May 2023 23:42:44 +0000 Received: from mail-pl1-x631.google.com ([2607:f8b0:4864:20::631]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1puiav-000can-57 for pgsql-hackers@postgresql.org; Thu, 04 May 2023 23:42:43 +0000 Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1aae46e62e9so8095055ad.2 for ; Thu, 04 May 2023 16:42:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683243758; x=1685835758; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=nrxYgLfQvcasudyAFZ7rxkekhR1wvD7NSk9k+bLvIYs=; b=sGsr6lSMT26wgi+7br572956MCsAVxj29VCmjZFgbtiSAdyg1d5XjE21Kq/Ahx86w8 7GFbFB+JsXs8KNfyf2CtKYDQXTKViB3rmsJJtcHwU1qCKcRswuHWAImY5kzoF4exC+vQ pntpuEilHG2M5A7Qs8E3zMRGq3eC9Br2l8d131gRZd0B1Nyf85wpvZr+L5fLpp9sZiU2 idgARkDb/FtAZH/NruxO5kv07b3xsXbX6Fu3B6CJfgFMq7ggHYCWlOSAbRINpQ5yeYs5 DWXvloFUzoDCIgZ9kWvp0VS+VFpvMZfEkslOgwAobtIZ/kjqT4oNNiG4mFnH3Y5nfWyQ B0TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683243758; x=1685835758; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=nrxYgLfQvcasudyAFZ7rxkekhR1wvD7NSk9k+bLvIYs=; b=WLpxo7hw5rzwt4zMhK7wZivBv008cgm5x1dUkD9M+e8cDBZK0yLl3m71MMt1feHYcm 4KcGcbIHIEBQE+SDxgvGaoMIjKiI1LqrQkit1PmKBde3rRDsofbnW6Urg51CuMkTzWKA X/PaQ76KVi6p4ahnijliZTqZ4r+Fgr6LcdpcZr8908BQzsH+x5onQW/XE05gHdoduX/K yoiNoXyT9VIZ7LPHAQUNd8/9CgWnLuWOH28sm40gybBf8zTUiiBIt7O0tAvK/qqsSPZ6 XPYB25G+hM7lx9rJ5rC0zMz21k+AOi2ktR5tnTB5fQyavWclZFq25xGPiMf/lGY/t9tI qaGw== X-Gm-Message-State: AC+VfDylzolPHC+CjPPyrGj7ScNUA80En3wKdoZGXvFUKIOB53eQ2jn7 oCXfwKO+7Q9xh1L4GKERDH4= X-Google-Smtp-Source: ACHHUZ6wVsLDKMJNwllBEC5C878RsXnMuCavVRacaIS4GhEAcqmklJT4/7GYy2lvwK2fOesPV3pJyg== X-Received: by 2002:a17:902:ea8b:b0:19e:b6b0:6b3 with SMTP id x11-20020a170902ea8b00b0019eb6b006b3mr5659377plb.15.1683243758273; Thu, 04 May 2023 16:42:38 -0700 (PDT) Received: from nathanxps13 ([50.47.162.83]) by smtp.gmail.com with ESMTPSA id q5-20020a170902bd8500b001a804b16e38sm115194pls.150.2023.05.04.16.42.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 May 2023 16:42:37 -0700 (PDT) Date: Thu, 4 May 2023 16:42:35 -0700 From: Nathan Bossart To: Tom Lane Cc: Andres Freund , Xing Guo , pgsql-hackers@postgresql.org Subject: Re: PL/Python: Fix return in the middle of PG_TRY() block. Message-ID: <20230504234235.GA2419591@nathanxps13> References: <1864041.1673882943@sss.pgh.pa.us> <20230120010711.jpqbaelpgmuvt2vq@awork3.anarazel.de> <20230120190201.GC4106863@nathanxps13> <20230503202116.GA2110623@nathanxps13> <3012766.1683146012@sss.pgh.pa.us> <20230503205838.GA2112379@nathanxps13> <20230504045413.GA2202617@nathanxps13> <20230504050108.GA2203557@nathanxps13> <3200088.1683203943@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3200088.1683203943@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, May 04, 2023 at 08:39:03AM -0400, Tom Lane wrote: > Hmm, I'm not sure why PLy_trigger_build_args's pltargs needs to > gain a "volatile" here? LGTM otherwise. I removed that new "volatile" marker before committing. I was trying to future-proof a bit and follow elog.h's recommendation to the letter, but following your mental model upthread, it doesn't seem to be strictly necessary, and we'd need to set pltargs to NULL after decrementing its reference count in the PG_TRY section for such future-proofing to be effective, anyway. Thank you for reviewing! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com