Index corruption under PostgreSQL 6.5beta3

From: Marcus Mascari <mascarim(at)yahoo(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Index corruption under PostgreSQL 6.5beta3
Date: 1999-06-10 06:24:23
Message-ID: 19990610062423.26871.rocketmail@web120.yahoomail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

We have an application which imports a significant
amount of data from a mainframe on a nightly basis.
The application which does this wraps its code in
a BEGIN/END transacation. During the process,
indexes are dropped and recreated. If the process is
not successful, the indexes are left in an unusable
state. Postgres always yeilds a:

ERROR: Index k_vendors2 is not a btree

message. Therefore, we changed the code to look like
this:

1. BEGIN
... do some stuff ...
END

2. DROP index k_foo;
COPY foo from 'import.txt'
CREATE index k_foo;

3. BEGIN
... do some stuff ...
END

The application, due to errors in the import data,
is not completing to termination. It is exitting
in block 3. However, the indexes on foo are left
corrupted. We've had to go in and recreate them
by hand. The DROP/COPY/CREATE sequence in step 2
is performed on multiple tables...and all of them are
corrupted following the abnormal termination of the
process.

Any help with this issue would be greatly appreciated.

Marcus Mascari (mascarim(at)yahoo(dot)com)

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Vadim Mikheev 1999-06-10 06:29:32 Re: [HACKERS] Index corruption under PostgreSQL 6.5beta3
Previous Message Kaare Rasmussen 1999-06-10 04:50:30 Re: [HACKERS] Priorities for 6.6