dbTalk Databases Forums  

Re: [BUGS] Why is the index not created in the tablespace delivered in the create-index-command ?

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss Re: [BUGS] Why is the index not created in the tablespace delivered in the create-index-command ? in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] Why is the index not created in the tablespace delivered in the create-index-command ? - 10-11-2004 , 11:36 AM






Michael Kleiser <mkl (AT) webde-ag (DOT) de> writes:
Quote:
test1=> select * from pg_indexes where tablename='foobar';
schemaname | tablename | tablespace | indexname | indexdef
------------+-----------+------------+-----------+-------------------------------------------------------------------------
public | foobar | ts_test_1 | ix_foobar | CREATE INDEX ix_foobar ON foobar USING btree (foo) TABLESPACE ts_test_2
(1 row)

Why is index "ix_foobar" in tablespace "ts_test_1" and not in tablespace "ts_test_2" ?
Is it a bug ?
The index is in fact in the right tablespace, as you can verify by
checking its pg_class entry. The problem is that the pg_indexes view is
showing you the table's tablespace and not the index's. I think this is
clearly wrong, or at least not what one would find most useful.

Since we've already decided to force an initdb for beta4, there doesn't
seem to be any downside to fixing this now. I'm going to change the
view to show the index tablespace instead of the table's, and I think
also move the tablespace one column to the right --- it seems bizarre
to place it before the index name.

Thanks for the report!

regards, tom lane

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


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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.