Re: identifying unrecognized node type errors

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: identifying unrecognized node type errors
Date: 2022-03-25 09:55:42
Message-ID: CAExHW5v1dMF0C_SnkpthfW_Hz=hYWehoOXeLyAxymLGub8dU8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

All these functions are too low level to be helpful to know. Knowing
the caller might actually give a hint as to where the unknown node
originated from. We may get that from the stack trace if that's
available. But if we could annotate the error with error_context that
will be super helpful. For example, if we could annotate the error
message like "while searching for columns to hash" for
expression_tree_walker() called from
find_hash_columns->find_cols->find_cols_walker->expression_tree_walker().
That helps to focus on group by colum expression for example. We could
do that by setting up an error context in find_hash_columns(). But
that's a lot of work.

On Fri, Mar 25, 2022 at 2:04 AM Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 3/24/22 16:10, Tom Lane wrote:
> > Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> >> As I was tracking down some of these errors in the sql/json patches I
> >> noticed that we have a whole lot of them in the code, so working out
> >> which one has triggered an error is not as easy as it might be. ISTM we
> >> could usefully prefix each such message with the name of the function in
> >> which it occurs, along the lines of this fragment for nodeFuncs.c. Thoughts?
> > -1. You're reinventing the error location support that already exists
> > inside elog. Just turn up log_error_verbosity instead.
> >
> >
>
>
>
> Yeah, must have had some brain fade. Sorry for the noise.
>
>
> cheers
>
>
> andrew
>
> --
> Andrew Dunstan
> EDB: https://www.enterprisedb.com
>
>
>

--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wangw.fnst@fujitsu.com 2022-03-25 10:19:32 RE: Logical replication timeout problem
Previous Message Fabien COELHO 2022-03-25 09:50:09 Re: [PATCH] pgbench: add multiconnect option