Re: PL/Python: Fix return in the middle of PG_TRY() block.

From: Xing Guo <higuoxing(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: PL/Python: Fix return in the middle of PG_TRY() block.
Date: 2023-05-05 01:40:32
Message-ID: CACpMh+D0qmQodjfxyo99xP=G9Lnt2DONO05t4zSrGooP28mswA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry for not responding to this thread for a long time and a huge thank
you for pushing it forward!

Best Regards,
Xing

On Fri, May 5, 2023 at 7:42 AM Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> 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
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2023-05-05 02:06:54 Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing
Previous Message Andres Freund 2023-05-04 23:54:13 Re: issue with meson builds on msys2