Re: GiST seems to drop left-branch leaf tuples

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Peter Tanski <ptanski(at)raditaz(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: GiST seems to drop left-branch leaf tuples
Date: 2010-11-23 07:29:14
Message-ID: 4CEB6D4A.2090201@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 22.11.2010 23:18, Peter Tanski wrote:
> Whatever test I use for Same(), Penalty() and Consistent() does not seem
> to affect the problem significantly. For now I am only using
> Consistent() as a check for retrieval.

I believe it's not possible to lose leaf tuples with incorrectly defined
gist support functions. You might get completely bogus results, but the
tuples should be there when you look at gist_tree() output. So this
sounds like a gist bug to me.

> Note that there are only 133 leaf tuples -- for 500 rows. If the index
> process were operating correctly, there should have been 500 leaf tuples
> there. If I REINDEX the table the number of leaf tuples may change
> slightly but not by much.

One idea for debugging is to insert the rows to the table one by one,
and run the query after each insertion. When do the leaf tuples disappear?

If you can put together a small self-contained test case and post it to
the list, I can take a look.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kris Jurka 2010-11-23 07:33:08 Re: [JDBC] Support for JDBC setQueryTimeout, et al.
Previous Message Pavel Stehule 2010-11-23 05:53:43 Re: final patch - plpgsql: for-in-array