|From:||Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>|
|To:||Guillaume Lelarge <guillaume(at)lelarge(dot)info>|
|Subject:||Re: WIP : change tablespace for a database|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
Guillaume Lelarge <guillaume(at)lelarge(dot)info> writes:
> To get the list of relations to move, the user needs to be connected to
> the database.
Why? If what you are doing is changing the database's default
tablespace (which IMHO is what such a command ought to do) then
all you have to do is bulk-copy the per-DB subdirectory from
the old default tablespace to the new one. There's no reason to
think about it at the individual-relation level, and there won't be
any change to the contents of any catalog in the DB either (only
its pg_database row will change).
> One other thing, a much worse one. It seems I can't move sys objects.
The nailed relations have to stay in the DB's default tablespace,
yes. This is one of the reasons for my opinion above about what
the command's behavior should be.
regards, tom lane
|Next Message||Simon Riggs||2008-10-15 18:37:55||SlruPhysicalReadPage|
|Previous Message||Robert Haas||2008-10-15 18:12:06||Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED|