pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Brothers <johnbr@mindspring.com>
Cc: pgsql-general@hub.org
Cc: pgsql-sql@hub.org
Subject: Re: [SQL] RE: [GENERAL] Problem with SELECT on large negative INT4
Date: Fri, 28 Jan 2000 00:31:26 -0500 (EST)
Message-ID: <200001280531.AAA11561@candle.pha.pa.us> (raw)
In-Reply-To: <9485.949034954@sss.pgh.pa.us>

> Actually, if Nicolas' table contains both very large positive and very
> large negative integers, then his index could be messed up pretty badly.
> What Hiroshi saw (and I missed :-() was that btint4cmp can fail and
> return a result of the wrong sign if the difference between two integers
> overflows.  Since index sorting depends critically on the assumption
> that the comparator always returns consistent results (a < b and b < c
> must imply a < c, but this can fail if a - c overflows), you could have
> an out-of-order index.  And then probes into the index could fail to
> find items they should find ... which is exactly the complained-of
> symptom.
> 
> Hiroshi neglected to mention that you'd probably need to drop and
> recreate the index after applying the patch; if it's indeed out of
> order, just patching the comparator bug isn't enough to fix it.
> 

Does Hiroshi's patch get applied?

-- 
  Bruce Momjian                        |  http://www.op.net/~candle
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



view thread (18+ messages)  latest in thread

Message-ID: <200001280531.AAA11561@candle.pha.pa.us>
Permalink:  ../200001280531.AAA11561@candle.pha.pa.us/
Also on:    postgresql.org/message-id/200001280531.AAA11561@candle.pha.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: pgman@candle.pha.pa.us, tgl@sss.pgh.pa.us, johnbr@mindspring.com, pgsql-general@hub.org, pgsql-sql@hub.org
  Subject: Re: [SQL] RE: [GENERAL] Problem with SELECT on large negative INT4
  In-Reply-To: <200001280531.AAA11561@candle.pha.pa.us>
  References: <9485.949034954@sss.pgh.pa.us> <200001280531.AAA11561@candle.pha.pa.us>

* 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