Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes

From: Joe Conway <mail(at)joeconway(dot)com>
To:
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Date: 2002-08-19 05:53:30
Message-ID: 3D6087DA.70201@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Joe Conway wrote:
> BTW, you were right-on on the other issue. I started with a fresh sync
> up from cvs, then configure, make all, make install, initdb. Now the
> problem is gone.

Hmmm -- I might have to take that back. Take a look at the following
session:

parts=# SELECT * from bombytea where parent_part > '02-' and parent_part
< '02-1';
parent_part | child_part | child_part_qty
-------------+--------------+----------------
02-00010-0 | NULL | 0
02-00015-0 | NULL | 0
02-00015-1 |
...
02-06360-00 | 46-01-12700 | 0
02-06360-00 | 02-03360-0 | 1
(492 rows)

parts=# SELECT * from bombytea where parent_part like '02-%';
server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Succeeded.
parts=# \q
[root(at)jec-linux pgsql]# psql -U postgres parts
Welcome to psql 7.3devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

parts=# SELECT * from bombytea where parent_part > '02-' and parent_part
< '02-1';
ERROR: Index bombytea_idx1 is not a btree
parts=# \q
[root(at)jec-linux pgsql]# /etc/init.d/postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
[root(at)jec-linux pgsql]# psql -U postgres parts
Welcome to psql 7.3devel, the PostgreSQL interactive terminal.

Type: \copyright for distribution terms
\h for help with SQL commands
\? for help on internal slash commands
\g or terminate with semicolon to execute query
\q to quit

parts=# SELECT * from bombytea where parent_part > '02-' and parent_part
< '02-1';
ERROR: Index bombytea_idx1 is not a btree
parts=# drop index bombytea_idx1;
DROP INDEX
parts=# create index bombytea_idx1 on bombytea (parent_part);
CREATE INDEX
parts=# SELECT * from bombytea where parent_part > '02-' and parent_part
< '02-1';
parent_part | child_part | child_part_qty
-------------+--------------+----------------
02-00010-0 | NULL | 0
02-00015-0 |
...
02-06360-00 | 46-01-12700 | 0
02-06360-00 | 02-03360-0 | 1
(492 rows)

So it appears that "SELECT * from bombytea where parent_part like
'02-%'; server closed the connection unexpectedly" somehow physically
corrupts the index!? This is starting from `make clean` with an initdb
just prior.

Any ideas?

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2002-08-19 07:20:59 pg_dump segfaults on command-line arguments?
Previous Message Thomas T. Thai 2002-08-19 05:13:28 diff and advantages of contrib/tree & contrib/ltree

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2002-08-19 13:07:55 Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Previous Message Rod Taylor 2002-08-19 03:28:43 Brief note about dependencies during upgrade to 7.3 or later