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

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes
Дата
Msg-id 3D6087DA.70201@joeconway.com
обсуждение исходный текст
Ответ на bytea operator bugs (was Re: [GENERAL] BYTEA, indexes and "like")  (Joe Conway <mail@joeconway.com>)
Ответы Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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@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@jec-linux pgsql]# /etc/init.d/postgresql restart
Stopping postgresql service:                               [  OK  ]
Starting postgresql service:                               [  OK  ]
[root@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


В списке pgsql-patches по дате отправления:

Предыдущее
От: Rod Taylor
Дата:
Сообщение: Brief note about dependencies during upgrade to 7.3 or later
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bytea operator bugs (was Re: [GENERAL] BYTEA, indexes