Re: Showing applied extended statistics in explain Part 2

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>, Tatsuro Yamada <yamatattsu(at)gmail(dot)com>, Masahiro(dot)Ikeda(at)nttdata(dot)com
Cc: tomas(dot)vondra(at)enterprisedb(dot)com, tatsuro(dot)yamada(at)ntt(dot)com, pgsql-hackers(at)postgresql(dot)org, Masao(dot)Fujii(at)nttdata(dot)com
Subject: Re: Showing applied extended statistics in explain Part 2
Date: 2024-11-18 21:38:53
Message-ID: d441b669-b39e-4a71-9d00-997fb1c74065@vondra.me
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/18/24 22:15, Tomas Vondra wrote:
> ...
>
> So I think the correct solution is to not pass any expressions with
> RestrictInfo to deparse_expression(). Either by stripping the nodes, or
> by not adding them at all.
>
> The patch tries to do the stripping by maybe_extract_actual_clauses(),
> but that only looks at the top node, and that is not sufficient here.
> Maybe it would be possible to walk the whole tree, and remove all the
> RestrictInfos nodes - including intermediate ones, not just the top. But
> I'm not quite sure it wouldn't cause issues elsewhere (assuming it
> modifies the existing nodes). It still feels a bit like fixing a problem
> we shouldn't really have ...
>

To make this idea a bit more concrete, here's a patch removing all
RestrictInfo nodes in show_stat_qual(). But still, it feels wrong.

regards

--
Tomas Vondra

Attachment Content-Type Size
rinfo-fix.patch text/x-patch 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Filip Janus 2024-11-18 21:58:27 Re: Proposal: Adding compression of temporary files
Previous Message Marcos Pegoraro 2024-11-18 21:36:45 Re: pg_dump --no-comments confusion