public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: David Rowley <[email protected]>
Cc: PostgreSQL Developers <[email protected]>
Cc: Andrey Lepikhov <[email protected]>
Subject: Re: Is it worth adding Assert(false) for unknown paths in print_path()?
Date: Thu, 28 Sep 2023 10:23:43 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAApHDvrNB2maad+O+rUGV1Fzj=WQHiJTXSfQx5KBFDxyfjmbeA@mail.gmail.com>
References: <CAApHDvrNB2maad+O+rUGV1Fzj=WQHiJTXSfQx5KBFDxyfjmbeA@mail.gmail.com>
David Rowley <[email protected]> writes:
> In [1] Andrey highlighted that I'd forgotten to add print_path()
> handling for TidRangePaths in bb437f995.
> I know the OPTIMIZER_DEBUG code isn't exactly well used. I never
> personally use it and I work quite a bit in the planner, however, if
> we're keeping it, I thought maybe we might get the memo of missing
> paths a bit sooner if we add an Assert(false) in the default cases.
FWIW, I'd argue for dropping print_path rather than continuing to
maintain it. I never use it, finding pprint() to serve the need
better and more reliably. However, assuming that we keep it ...
> Is the attached worthwhile?
... I think this is actually counterproductive. It will certainly
not help draw the notice of anyone who wouldn't otherwise pay
attention to print_path. Also, observe the extremely longstanding
policy decision in outNode's default: case:
/*
* This should be an ERROR, but it's too useful to be able to
* dump structures that outNode only understands part of.
*/
elog(WARNING, "could not dump unrecognized node type: %d",
(int) nodeTag(obj));
break;
The same argument applies to print_path, I should think.
regards, tom lane
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Is it worth adding Assert(false) for unknown paths in print_path()?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox