pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dmitry Dolgov <9erthalion6@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Naylor <john.naylor@enterprisedb.com>
Cc: tharakan@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17774: Assert triggered on brin_minmax_multi.c
Date: Wed, 8 Feb 2023 16:33:13 +0100
Message-ID: <20230208153313.fym7at3ubgrec67a@ddolgov.remote.csb> (raw)
In-Reply-To: <3485884.1675868581@sss.pgh.pa.us>
References: <17774-c6f3e36dd4471e67@postgresql.org>
	<CAFBsxsEMigeTVhBOpsBHw+SJS1n776akNqVC8ATEDmGo_OPgrw@mail.gmail.com>
	<20230208100658.mz2kkeruoma6iqtw@ddolgov.remote.csb>
	<3485884.1675868581@sss.pgh.pa.us>

> On Wed, Feb 08, 2023 at 10:03:01AM -0500, Tom Lane wrote:
> Dmitry Dolgov <9erthalion6@gmail.com> writes:
> > The negative delta might be only a consequence. From what I see it's
> > called from build_distances, and the idea is to find the gaps between
> > the max value of the current interval and the min value of the next one,
> > so they should be ordered and delta should be always positive.
>
> I'd believe this argument more readily if the calculation weren't being
> done in float arithmetic.  Since it is, you're at the mercy of roundoff
> error ... and that small negative delta could certainly pass for
> roundoff error.
>
> Clamping the result to [0,1] would be a brighter plan than just asserting
> that it's in-range.

Hmm...yeah, good point. In both the reproducer I've posted and the
backtrace from the thread the delta is indeed rather small.





view thread (13+ messages)  latest in thread

Message-ID: <20230208153313.fym7at3ubgrec67a@ddolgov.remote.csb>
Permalink:  ../20230208153313.fym7at3ubgrec67a@ddolgov.remote.csb/
Also on:    postgresql.org/message-id/20230208153313.fym7at3ubgrec67a@ddolgov.remote.csb

 · 

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: 9erthalion6@gmail.com, tgl@sss.pgh.pa.us, john.naylor@enterprisedb.com, tharakan@gmail.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #17774: Assert triggered on brin_minmax_multi.c
  In-Reply-To: <20230208153313.fym7at3ubgrec67a@ddolgov.remote.csb>

* 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