Re: Moving a tablespace
От | Tom Lane |
---|---|
Тема | Re: Moving a tablespace |
Дата | |
Msg-id | 14078.1156300499@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Moving a tablespace (Michael Fuhr <mike@fuhr.org>) |
Список | pgsql-performance |
Michael Fuhr <mike@fuhr.org> writes: > On Tue, Aug 22, 2006 at 06:16:54PM -0700, Craig A. James wrote: >> Is there a way to move a tablespace to a new location without a >> dump/restore? > The last paragraph of the Tablespaces documentation might be helpful: > http://www.postgresql.org/docs/8.1/interactive/manage-ag-tablespaces.html > I just tested this and it appeared to work, but this hypothetical > DBA might want to wait for others to comment before proceeding. AFAIK it works fine. Shut down postmaster, move tablespace's directory tree somewhere else, fix the symbolic link in $PGDATA/pg_tblspc, start postmaster, update the pg_tablespace entry. There isn't anyplace else in Postgres that knows where that link leads. But if you are running a hot PITR backup, see the caveats in TFM about what will happen on the backup machine. > He might also want to initdb and populate a test cluster and practice > the procedure before doing it for real. "Always mount a scratch monkey" ... regards, tom lane
В списке pgsql-performance по дате отправления: