pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16863: Assert failed in set_plain_rel_size() on processing ~* with a long prefix
Date: Sat, 13 Feb 2021 00:00:00 +0300
Message-ID: <881ff073-daac-7946-cc66-c61dcfb5efa6@gmail.com> (raw)
In-Reply-To: <1578689.1613162261@sss.pgh.pa.us>
References: <16863-35bf75b1b5ee4032@postgresql.org>
	<6de0a0c3-ada9-cd0c-3e4e-2fa9964b41e3@gmail.com>
	<1578689.1613162261@sss.pgh.pa.us>

Hello Tom,
12.02.2021 23:37, Tom Lane wrote:
> Alexander Lakhin <exclusion@gmail.com> writes:
>> I've found a division that produces NaN:
>> sel /= pow(FIXED_CHAR_SEL, fixed_prefix_len);
> Hmm.  I'm not getting a NaN AFAICT, but I am getting pretty darn weird
> estimates.  I agree this needs some kind of clamp.
>
> regression=# create table test (t text);
> CREATE TABLE
> regression=# explain SELECT * FROM test WHERE t ~* ('^' || repeat('-', 500));
> ...
>  Seq Scan on test  (cost=0.00..27.00 rows=10000000000000000159028911097599180468360808563945281389781327557747838772170381060813469985856815104 width=32)
The same number I've seen on the master branch. But on REL_13_STABLE I
get a NaN and then the assertion failure. (I've chosen the version 13.2
in the bug report, but it's really delayed somewhere.)
Though that division produced a NaN for me on both branches.

Best regards,
Alexander





view thread (5+ messages)  latest in thread

Message-ID: <881ff073-daac-7946-cc66-c61dcfb5efa6@gmail.com>
Permalink:  ../881ff073-daac-7946-cc66-c61dcfb5efa6@gmail.com/
Also on:    postgresql.org/message-id/881ff073-daac-7946-cc66-c61dcfb5efa6@gmail.com

 · 

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: exclusion@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16863: Assert failed in set_plain_rel_size() on processing ~* with a long prefix
  In-Reply-To: <881ff073-daac-7946-cc66-c61dcfb5efa6@gmail.com>

* 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