Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: David Rowley <dgrowleyml(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL
Date: 2023-03-24 21:12:13
Message-ID: 7B102B29-2E63-4BE5-9CAB-60A5E3BF6D15@yesql.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 24 Mar 2023, at 21:59, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
> On Fri, 24 Mar 2023 at 20:31, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> wrote:

>> On 23.03.23 09:52, David Rowley wrote:
>>> One thing I thought about while looking is it stage 2 might do
>>> something similar for SearchSysCacheN. I then wondered if we're more
>>> likely to want to keep the localised __FILE__, __LINE__ and __func__
>>> in the elog for those or not. It's probably less important that we're
>>> losing those for this change, but worth noting here at least in case
>>> nobody else thought of it.
>>
>> I don't follow what you are asking for here.
>
> I had two points:
>
> 1. Doing something similar for SearchSysCache1 and co might be a good
> phase two to this change.

Quite possibly yes, they do follow a pretty repeatable pattern.

> 2. With the change Daniel is proposing here, \set VERBOSITY verbose is
> not going to print as useful information to tracking down where any
> unexpected nulls in the catalogue originates.

Thats a fair point for the elog() removals, for the rather many assertions it
might be a net positive to get a non-local elog when failing in production.

--
Daniel Gustafsson

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2023-03-24 21:21:27 Re: Add SHELL_EXIT_CODE to psql
Previous Message Tom Lane 2023-03-24 21:05:30 Re: Make fop less verbose when building PDF