pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrei Lepikhov <lepihov@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: tharakan@gmail.com, pgsql-bugs@lists.postgresql.org, PG Bug reporting form <noreply@postgresql.org>
Cc: Alexander Korotkov <aekorotkov@gmail.com>
Cc: Tomas Vondra <tomas@vondra.me>
Subject: Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2
Date: Tue, 15 Apr 2025 11:41:08 +0200
Message-ID: <048f142e-18eb-4416-b7c7-b1398e667b3c@gmail.com> (raw)
In-Reply-To: <CAApHDvocZCUhM9W9mJ39d6oQz7ePKoqFnao_347mvC-A7QatcQ@mail.gmail.com>
References: <18885-da51324078588253@postgresql.org>
	<f485c85f-9796-467e-81fe-43e8127cbb35@vondra.me>
	<CAApHDvocZCUhM9W9mJ39d6oQz7ePKoqFnao_347mvC-A7QatcQ@mail.gmail.com>

On 4/14/25 01:26, David Rowley wrote:
> just "continue;". The variable would only be needed if there was some
> inner loop and we couldn't use "continue".
+1
> * XXX Maybe we should allow searching the expressions even if we
> * found an attribute matching the expression? That would handle
> * trivial expressions like "(a)" but it seems fairly useless.
> */
> Maybe it meant "matching the Var"?
+1

I have read your modification of comments to 
estimate_multivariate_ndistinct. It suggested the idea of letting the 
GroupVarInfo struct be exported. For now, only add_unique_group_var or 
another internal selfuncs.c routine may build this list.
I'm not sure that the GroupVarInfo abstraction is shaped ideally at the 
moment, but it seems it may perform duties similar to RestrictInfo but 
for grouping keys: store the key, cache data about this key, cache 
statistics and estimations.
It would be the first step in letting modules use 
estimate_multivariate_ndistinct. Likewise, we can use 
statext_clauselist_selectivity and dependencies_clauselist_selectivity.

What do you think about that?

P.S. statext_mcv_clauselist_selectivity deserves to be exported, too.

-- 
regards, Andrei Lepikhov





view thread (15+ messages)  latest in thread

Message-ID: <048f142e-18eb-4416-b7c7-b1398e667b3c@gmail.com>
Permalink:  ../048f142e-18eb-4416-b7c7-b1398e667b3c@gmail.com/
Also on:    postgresql.org/message-id/048f142e-18eb-4416-b7c7-b1398e667b3c@gmail.com

 · 

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: pgsql-bugs@postgresql.org
  Cc: lepihov@gmail.com, dgrowleyml@gmail.com, noreply@postgresql.org, aekorotkov@gmail.com, tomas@vondra.me
  Subject: Re: BUG #18885: ERROR: corrupt MVNDistinct entry - 2
  In-Reply-To: <048f142e-18eb-4416-b7c7-b1398e667b3c@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox