Re: Assert name/short_desc to prevent SHOW ALL segfault

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Andres Freund <andres(at)anarazel(dot)de>, Steve Chavez <steve(at)supabase(dot)io>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Assert name/short_desc to prevent SHOW ALL segfault
Date: 2022-05-27 17:43:17
Message-ID: 20220527174317.GA1650647@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, May 26, 2022 at 11:01:44PM -0400, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> FWIW, I would be fine to backpatch the NULL handling for short_desc,
>> while treating the addition of nonnull as a HEAD-only change.
>
> Yeah, sounds about right to me. My guess is that we will need
> a configure check for nonnull, but perhaps I'm wrong.

Makes sense. Here's a new patch set. 0001 is the part intended for
back-patching, and 0002 is the rest (i.e., adding pg_attribute_nonnull()).
I switched to using __has_attribute to discover whether nonnull was
supported, as that seemed cleaner. I didn't see any need for a new
configure check, but maybe I am missing something.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
v4-0001-Properly-handle-NULL-short-descriptions-for-custo.patch text/x-diff 2.0 KB
v4-0002-Introduce-pg_attribute_nonnull-and-use-it-for-Def.patch text/x-diff 3.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2022-05-27 18:48:45 Re: suboverflowed subtransactions concurrency performance optimize
Previous Message Masahiko Sawada 2022-05-27 16:15:18 Re: Support logical replication of DDLs