Re: [PATCH] Make jsonapi usable from libpq - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [PATCH] Make jsonapi usable from libpq
Date
Msg-id A9C1EB9B-F3BF-4A2E-B46A-F301348E272A@yesql.se
Whole thread Raw
In response to Re: [PATCH] Make jsonapi usable from libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> On 28 Jun 2021, at 21:15, Tom Lane <tgl@sss.pgh.pa.us> wrote:

> I wrote:
>>> Not real sure what to do about PGTHREAD_ERROR.
>
>> I wonder if we shouldn't simply nuke that macro and change the
>> call sites into "Assert(false)".
>
> After further study this still seems like the best available choice.

While this solution has a potential downside as you mention upthread, I can't
see any better alternative, and this is clearly better than what we have now.

> My proposal is to replace PGTHREAD_ERROR by Assert(false)
> in HEAD, but leave things alone in the back branches.

+1

> As far as the other patch to check for mistakes with "nm"
> goes, we could either do nothing in the back branches, or
> install a check for "exit" only, not "abort".  But there's
> probably no real need for such a check in the back branches
> as long as we're enforcing it in HEAD.

I don't see any real reason to backport the check, but enforce it in HEAD going
forward.  The risk of introducing an exit in backbranches when enforced against
in HEAD seem pretty manageable.

--
Daniel Gustafsson        https://vmware.com/




pgsql-hackers by date:

Previous
From: Elijah Stone
Date:
Subject: Re: Composite types as parameters
Next
From: Tom Lane
Date:
Subject: Re: Preventing abort() and exit() calls in libpq