Unix Technical Forum

FWD: bug report: index is not a btree

This is a discussion on FWD: bug report: index is not a btree within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 1802 Logged by: Jenny Wang Email address: y6108@vip.sina.com PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:03 AM
Greg Sabino Mullane
 
Posts: n/a
Default FWD: bug report: index is not a btree



The following bug has been logged online:

Bug reference: 1802
Logged by: Jenny Wang
Email address: y6108@vip.sina.com
PostgreSQL version: 7.3.10
Operating system: RedHat 8
Description: index is not a btree
Details:

1 $ cd <prefix>
$ cd bin

2 $ ./postmaster -D data &
$ ./psql TEST
TEST=#create table a(col1 int primary key);

3 $ kill -9 <postmaster pid>

4 $ ./postmaster -D data &
$ ./psql TEST
TEST=#insert into a values(1);

ERROR: Index a_pkey is not a btree

the file of a_pkey has size 8k, and is all zero.



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:03 AM
Michael Fuhr
 
Posts: n/a
Default Re: FWD: bug report: index is not a btree

On Wed, Aug 03, 2005 at 09:46:23AM -0000, Greg Sabino Mullane wrote:
>
> 2 $ ./postmaster -D data &
> $ ./psql TEST
> TEST=#create table a(col1 int primary key);
>
> 3 $ kill -9 <postmaster pid>
>
> 4 $ ./postmaster -D data &
> $ ./psql TEST
> TEST=#insert into a values(1);
>
> ERROR: Index a_pkey is not a btree
>
> the file of a_pkey has size 8k, and is all zero.


I can duplicate this in 7.3.10, but only if the postmaster does a
redo when it restarts. If I do a checkpoint before killing the
postmaster then the insert succeeds.

I couldn't duplicate this behavior in 7.4.8, 8.0.3, or HEAD. The
7.4 Release Notes have an item about making B-tree indexes fully
WAL-safe, so I wonder if that fixes the problem.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 09:03 AM
Tom Lane
 
Posts: n/a
Default Re: FWD: bug report: index is not a btree

Michael Fuhr <mike@fuhr.org> writes:
> I can duplicate this in 7.3.10, but only if the postmaster does a
> redo when it restarts. If I do a checkpoint before killing the
> postmaster then the insert succeeds.
> I couldn't duplicate this behavior in 7.4.8, 8.0.3, or HEAD. The
> 7.4 Release Notes have an item about making B-tree indexes fully
> WAL-safe, so I wonder if that fixes the problem.


Yeah. Before 7.4 there was no WAL record emitted for the act of
initializing the btree metapage, so this behavior is pretty much
exactly what you'd expect. It's possible that we could backport
that single change, but if memory serves there were a number of
other ways in which btree index build violated the WAL principle,
so I'm not sure there's much point. You more or less had to
checkpoint to be sure the new index is fully down to disk.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:55 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com