pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: shihao zhong <zhong950419@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tomas Vondra <tomas.vondra@enterprisedb.com>
Cc: pgsql-bugs@lists.postgresql.org, Masahiko Sawada <sawada.mshk@gmail.com>
Subject: Re: BUG #17969: Assert failed in bloom_init() when false_positive_rate = 0.25
Date: Wed, 8 Nov 2023 14:18:33 +0900
Message-ID: <ZUsaKYl9jKoATwRp@paquier.xyz> (raw)
In-Reply-To: <e28ce947-4755-41cf-1460-4b92f4fbdc3a@gmail.com>
References: <17969-a6c54de48026d694@postgresql.org>
	<836412.1686502986@sss.pgh.pa.us>
	<CAD21AoANsYnyHHSK543e1mFwuRBsVATs-Z0RnrE9thqaSsWZbA@mail.gmail.com>
	<2322240.1686882232@sss.pgh.pa.us>
	<5540898f-706c-f399-2797-9e8fa58a5d81@gmail.com>
	<CAGRkXqSHB9aGTgHf0LPnv3ppMDA1iKxsZagyB3G+Drs5Tx7aZA@mail.gmail.com>
	<e28ce947-4755-41cf-1460-4b92f4fbdc3a@gmail.com>

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

Attachments:

  [application/pgp-signature] signature.asc (832B, ../ZUsaKYl9jKoATwRp@paquier.xyz/2-signature.asc)
  download

view thread (8+ messages)

Message-ID: <ZUsaKYl9jKoATwRp@paquier.xyz>
Permalink:  ../ZUsaKYl9jKoATwRp@paquier.xyz/
Also on:    postgresql.org/message-id/ZUsaKYl9jKoATwRp@paquier.xyz

 · 

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: michael@paquier.xyz, exclusion@gmail.com, zhong950419@gmail.com, tgl@sss.pgh.pa.us, tomas.vondra@enterprisedb.com, sawada.mshk@gmail.com
  Subject: Re: BUG #17969: Assert failed in bloom_init() when false_positive_rate = 0.25
  In-Reply-To: <ZUsaKYl9jKoATwRp@paquier.xyz>

* 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