Re: [PATCH] Make jsonapi usable from libpq

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Jacob Champion <pchampion(at)vmware(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Make jsonapi usable from libpq
Date: 2021-06-28 20:08:10
Message-ID: A9C1EB9B-F3BF-4A2E-B46A-F301348E272A@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 28 Jun 2021, at 21:15, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-06-28 20:34:35 Re: Preventing abort() and exit() calls in libpq
Previous Message Elijah Stone 2021-06-28 19:55:33 Re: Composite types as parameters