Re: BUG #17302: gist index prevents insertion of some data - Mailing list pgsql-hackers

From Darafei "Komяpa" Praliaskouski
Subject Re: BUG #17302: gist index prevents insertion of some data
Date
Msg-id CAC8Q8tLrGsfb1s+rFy0ZHe6rEJ4zLStrwVFfG83U1NDFAbGC0A@mail.gmail.com
Whole thread Raw
In response to Re: BUG #17302: gist index prevents insertion of some data  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On Thu, Dec 2, 2021 at 1:14 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Alexander Korotkov <aekorotkov@gmail.com> writes:
> I think losing precision in the gist penalty is generally OK.  Thus,
> it shouldn't be a problem to round a very small value as zero.

Check.

> Probably, we could even tolerate overflow in the gist penalty.

As long as overflow -> infinity, yeah I think so.  Seems like it
was a mistake to insert the overflow-testing functions in this code
at all, and we should simplify it down to plain C addition/subtraction/
multiplication.

The underflow should not throw an interrupting exception ever, even on plain SQL-level calculations. 

The code to implement was added in error by a series of misunderstandings and gets in the way of simple things too often. I dug into the history here:





 

                        regards, tom lane


pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pg_get_publication_tables() output duplicate relid
Next
From: Himanshu Upadhyaya
Date:
Subject: Re: SQL/JSON: functions