Re: Extended statistics improvement: multi-column MCV missing values

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: Enrique Sánchez <enriqueesanchz(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: Chengpeng Yan <chengpeng_yan(at)outlook(dot)com>, Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Subject: Re: Extended statistics improvement: multi-column MCV missing values
Date: 2026-07-24 15:03:11
Message-ID: 8f20a65f-a56c-497e-9cd3-f1e9691348ea@tantorlabs.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

The overall approach looks architecturally correctly. Just two cosmetic
nits:

1. In `mcv_can_cap()`, the early-exit branch uses braces around `return
false`. This would normally be written without braces.

2. The doc comment above `mcv_can_cap()` says condition requires the
clause to be either an  equality operator, or a bare boolean Var, but
implementation actually handles one more cases - `NOT var`

3. Apply pgindent into diff.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC,
https://tantorlabs.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Chao Li 2026-07-24 14:12:07 Re: Collect ALTER PUBLICATION commands for event triggers