Re: BUG #17969: Assert failed in bloom_init() when false_positive_rate = 0.25
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: shihao zhong <zhong950419@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Tomas Vondra <tomas.vondra@enterprisedb.com>, pgsql-bugs@lists.postgresql.org, Masahiko Sawada <sawada.mshk@gmail.com>
Date: 2023-11-08T05:18:33Z
Lists: pgsql-bugs
On Tue, Oct 24, 2023 at 04:00:00PM +0300, Alexander Lakhin wrote: > I had started this discussion with the same question, but Tom Lane proposed > to reformulate the Assert [1] and I agree that it's for good. > Index attribute options are checked when an index created, but then > attoptions can be changed in pg_attribute, for example. I mean that such > a check makes sense because there is an intermediate level between setting > the option and using it. This was registered in the CF, so I've looked at what you have here. As an expected percentage, enlarging the check as suggested is OK by me, so I've applied and backpatched the change. It's indeed surprising that we would check that on the first insert rather than enforcing a check at index creation because we know that it would be incompatible, but we cannot cross-check that in the individual reloption parsing, which is what is used when defining an index. This could be achieved with a post-parsing callback triggered once all the options are parsed and individually validated, at least it would be cleaner. Not backpatchable, but enforceable even if an index build is skipped. -- Michael
Commits
-
Enlarge assertion in bloom_init() for false_positive_rate
- 59fc39c0d5d9 14.11 landed
- 7e18c0bd63ae 15.6 landed
- 4dccf9575369 16.2 landed
- 1b2c6b756eaa 17.0 landed