Port Bug Report: fatal error occurs while building index

From: Unprivileged user <nobody>
To: pgsql-ports(at)postgresql(dot)org
Subject: Port Bug Report: fatal error occurs while building index
Date: 1999-06-01 02:43:19
Message-ID: 199906010243.WAA86590@hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-ports


============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================

Your name : Misha Routchiev
Your email address : routchiev(dot)mikhail(at)csfb(dot)com

Category : runtime: back-end
Severity : critical

Summary: fatal error occurs while building index

System Configuration
--------------------
Operating System : SunOS 5.5.1 (Solaris)

PostgreSQL version : 6.4.2

Compiler used : gcc 2.7.2.2

Hardware:
---------
SUN

Versions of other tools:
------------------------
gmake, probably flex

--------------------------------------------------------------------------

Problem Description:
--------------------
Problem happens while building index on relatively
large database (1M+ records)
indexed field is declared as varchar(16)). In the btree
index there are a lot of duplicate values (100s and more).
Somewhere in the middle of building,
following fatal error occurs:
btree: failed to add item to the page in _bt_sort (2)
(from nbtsort.c)
and frontend/backend pair exits leaving behind a lot
of temporary files

--------------------------------------------------------------------------

Test Case:
----------
This problem happens both in 6.3.2 and 6.4.2.
I when I extracted offending column trying to reproduce it,
and populated it into separate table, it created same index
on this column just fine, so it must somehow be related to
the size of the tuple as well.
Problem reproduces itself on the whole dump (too big to be
attached), though.

--------------------------------------------------------------------------

Solution:
---------
I tried to look into it, but I could only guess that
somehow lower exceeds upper in PageAddItem
because the size of the remaining space in Page
page is wrongly calculated (there is some strange
warning in PageGetFreeSpace() saying:
/* XXX not always true */
or spoiled by previous additions
I remember previous versions had the same problem with
integers, but is was fixed for release 6.3.
For anything beyond that I have too little knowledge of the
design.

--------------------------------------------------------------------------

Browse pgsql-ports by date

  From Date Subject
Next Message Unprivileged user 1999-06-01 10:48:07 Port Bug Report: executing a CREATE TABLE statement from a PL/pgSQL script crashes the backend
Previous Message Unprivileged user 1999-05-31 13:28:08 Port Bug Report: Joins (does not support outer, left, right)