dbTalk Databases Forums  

[BUGS] 8.0 doesn't dump index tablespace correctly.

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


Discuss [BUGS] 8.0 doesn't dump index tablespace correctly. in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TANIDA Yutaka
 
Posts: n/a

Default [BUGS] 8.0 doesn't dump index tablespace correctly. - 01-20-2005 , 12:17 AM






Hi,

pg_dump on 8.0 can't dump index's tablespace information if both table
and its index 's tablespaces are different. For example:

create table a(i int) tablespace ts1;
create index a_idx on a (i) tablespace ts2;
create index a_idx2 on a (i) tablespace pg_default;

Assuming tablespace ts1 ans ts2 were defined.

If dump and restore them , tablespace of a_idx and a_idx2 was ts1 ,
which is a's tablespace ,not index's one .

Here's a patch .

*** pg_dump.c.orig 2005-01-20 15:14:28.000000000 +0900
--- pg_dump.c 2005-01-20 15:14:53.000000000 +0900
***************
*** 6899,6905 ****
ArchiveEntry(fout, indxinfo->dobj.catId, indxinfo->dobj.dumpId,
indxinfo->dobj.name,
tbinfo->dobj.namespace->dobj.name,
! tbinfo->reltablespace,
tbinfo->usename, false,
"INDEX", q->data, delq->data, NULL,
indxinfo->dobj.dependencies, indxinfo->dobj.nDeps,
--- 6899,6905 ----
ArchiveEntry(fout, indxinfo->dobj.catId, indxinfo->dobj.dumpId,
indxinfo->dobj.name,
tbinfo->dobj.namespace->dobj.name,
! indxinfo->tablespace,
tbinfo->usename, false,
"INDEX", q->data, delq->data, NULL,
indxinfo->dobj.dependencies, indxinfo->dobj.nDeps,


--
TANIDA Yutaka <tanida (AT) sra (DOT) co.jp>


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

Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: [BUGS] 8.0 doesn't dump index tablespace correctly. - 01-22-2005 , 06:37 PM






TANIDA Yutaka <tanida (AT) sra (DOT) co.jp> writes:
Quote:
pg_dump on 8.0 can't dump index's tablespace information if both table
and its index 's tablespaces are different.
Good catch. Patch applied, thanks!

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


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.