Re: GiST: interpretation of NaN from penalty function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: amborodin(at)acm(dot)org, Andrew Borodin <borodin(at)octonica(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <obartunov(at)gmail(dot)com>, Teodor Sigaev <teodor(at)postgrespro(dot)ru>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Greg S <stark(at)mit(dot)edu>
Subject: Re: GiST: interpretation of NaN from penalty function
Date: 2016-09-14 18:02:57
Message-ID: 16339.1473876177@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Borodin <borodin(at)octonica(dot)com> writes:
> Currently GiST treats NaN penalty as zero penalty, in terms of
> generalized tree this means "perfect fit". I think that this situation
> should be considered "worst fit" instead.

On what basis? It seems hard to me to make any principled argument here.
Certainly, "NaN means infinity", as your patch proposes, has no more basis
to it than "NaN means zero". If the penalty function doesn't like that
interpretation, it shouldn't return NaN.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2016-09-14 18:10:05 Re: Vacuum: allow usage of more than 1GB of work mem
Previous Message Tom Lane 2016-09-14 17:57:42 Re: Vacuum: allow usage of more than 1GB of work mem