473,378 Members | 1,564 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Error with table

Hi,

Had a problem with PsotgreSQL v7.3.4. I had a table that, after a while,
decided to give me a fit:

db=> insert into blocklist values ('2', 'km4n7s28ehiFizeYupm93Q',
'1','2','3');
ERROR: Index idx_blk_id_addr is not a btree

When I deleted and recreated the table, it worked fine. Any ideas?

Table was initially defined thus:

db=> \d blocklist
Table "public.blocklist"
Column | Type | Modifiers
------------+-------------------+-------------
id | integer | not null
id_addr | character varying |
wl | integer | default '0'
bl | integer | default '0'
bl_gen | integer | default '0'
Indexes: idx_blk_usr_adr unique btree (id, id_addr),
idx_blk_id btree (id),
idx_blk_id_addr btree (id_addr)
Foreign Key constraints: $1 FOREIGN KEY (id) REFERENCES users(id) MATCH
FULL ON UPDATE CASCADE ON DELETE CASCADE,
$2 FOREIGN KEY (id_addr) REFERENCES
addresses(id_addr) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE

After I recreated it, it appears the same:

db=> \d blocklist
Table "public.blocklist"
Column | Type | Modifiers
------------+-------------------+-------------
id | integer | not null
id_addr | character varying |
wl | integer | default '0'
bl | integer | default '0'
bl_gen | integer | default '0'
Indexes: idx_blk_usr_adr unique btree (id, id_addr),
idx_blk_id btree (id),
idx_blk_id_addr btree (id_addr)
Foreign Key constraints: $1 FOREIGN KEY (id) REFERENCES users(id) MATCH
FULL ON UPDATE CASCADE ON DELETE CASCADE,
$2 FOREIGN KEY (id_addr) REFERENCES
addresses(id_addr) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE

This table's definition has not changed, but there were a few scripted
operations to update other tables in the db. Those operations completed
successfully.

Cheers!
Jon

--
Jon Earle

SAVE FARSCAPE http://www.savefarscape.com/

Vegetarian - an old Indian word meaning 'lousy hunter'.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #1
1 2660
such errors are almost always a result of on disk corruption, i.e. bad
blocks or bad memory, and every so often a little known bug or two that
pgsql has had. There are no known data loss bugs in 7.3.4 I know of,
except with hash indexes MAYBE in certain full moon circumstances.

You might wanna check your hardware (disks and memory) to make sure it
doesn't get little errors every now and then.

On Fri, 12 Dec 2003, Jon Earle wrote:
Hi,

Had a problem with PsotgreSQL v7.3.4. I had a table that, after a while,
decided to give me a fit:

db=> insert into blocklist values ('2', 'km4n7s28ehiFizeYupm93Q',
'1','2','3');
ERROR: Index idx_blk_id_addr is not a btree

When I deleted and recreated the table, it worked fine. Any ideas?

Table was initially defined thus:

db=> \d blocklist
Table "public.blocklist"
Column | Type | Modifiers
------------+-------------------+-------------
id | integer | not null
id_addr | character varying |
wl | integer | default '0'
bl | integer | default '0'
bl_gen | integer | default '0'
Indexes: idx_blk_usr_adr unique btree (id, id_addr),
idx_blk_id btree (id),
idx_blk_id_addr btree (id_addr)
Foreign Key constraints: $1 FOREIGN KEY (id) REFERENCES users(id) MATCH
FULL ON UPDATE CASCADE ON DELETE CASCADE,
$2 FOREIGN KEY (id_addr) REFERENCES
addresses(id_addr) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE

After I recreated it, it appears the same:

db=> \d blocklist
Table "public.blocklist"
Column | Type | Modifiers
------------+-------------------+-------------
id | integer | not null
id_addr | character varying |
wl | integer | default '0'
bl | integer | default '0'
bl_gen | integer | default '0'
Indexes: idx_blk_usr_adr unique btree (id, id_addr),
idx_blk_id btree (id),
idx_blk_id_addr btree (id_addr)
Foreign Key constraints: $1 FOREIGN KEY (id) REFERENCES users(id) MATCH
FULL ON UPDATE CASCADE ON DELETE CASCADE,
$2 FOREIGN KEY (id_addr) REFERENCES
addresses(id_addr) MATCH FULL ON UPDATE CASCADE ON DELETE CASCADE

This table's definition has not changed, but there were a few scripted
operations to update other tables in the db. Those operations completed
successfully.

Cheers!
Jon

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Morten Gulbrandsen | last post by:
C:\mysql\bin>mysql -u elmasri -pnavathe company Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29 to server version: 4.1.0-alpha-max-debug Type...
0
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
3
by: LineVoltageHalogen | last post by:
Greeting All, I have a stored proc that dynamically truncates all the tables in my databases. I use a cursor and some dynamic sql for this: ...... create cursor Loop through sysobjects and...
8
by: Kragen Sitaker | last post by:
ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index We've been getting this error in our application every once in a while --- typically once an hour to once a day,...
17
by: Steve Jorgensen | last post by:
If you've ever employed custom error numbers and messages in you programs, you've probably ended up with code similar to what I've ended up with in the past something like... <code> public...
1
by: annie | last post by:
Hi all, I have recently ported my Access 2000 app to SQL Server, keeping the Access client as the front end using linked tables. I am also using triggers on my SQL tables to trap orphan...
0
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with:...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: Janning Vygen | last post by:
Hi, i have a question about how to handle postgresql constraint errors in the client app. I found some mails in the archive about it, too. But i have still so many questions about how to do it,...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.