Re: BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: maxim(dot)boguk(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)
Date: 2022-08-25 20:49:09
Message-ID: 1573189.1661460549@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> I found very weird situation with size of highly selective partial hash
> indexes (they has almost same size as full table hash index).

hashbuild() sets up the initial hash index size based on estimating
the current number of rows in the table, without any correction for
partial-index selectivity. I don't find this to be a bug particularly.
The odds of making things worse via a bad estimate seem at least as
high as the odds of making things better.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Scott Zelenka 2022-08-26 00:22:15 Re: BUG #17593: min key size 112 bits from FIPS SP800-131 requirement for HMAC-SHA raises exception in SCRAM-SHA-256
Previous Message PG Bug reporting form 2022-08-25 20:19:54 BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)