Re: BUG #17594: conditional hash indexes size (hash index ignore WHERE condition during CREATE INDEX?)
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: maxim.boguk@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Date: 2022-08-25T20:49:09Z
Lists: pgsql-bugs
PG Bug reporting form <noreply@postgresql.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