Is it possible to move a database to another tablespace?

Started by Francisco Reyesalmost 19 years ago3 messagesgeneral
Jump to latest
#1Francisco Reyes
lists@stringsutils.com

I see tables and indexes can be moved to a different tablespace.

Is there any way to move an entire database to a different tablespace?

#2Ron Johnson
ron.l.johnson@cox.net
In reply to: Francisco Reyes (#1)
Re: Is it possible to move a database to another tablespace?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/19/07 14:51, Francisco Reyes wrote:

I see tables and indexes can be moved to a different tablespace.
Is there any way to move an entire database to a different tablespace?

Move one table at a time?

- --
Ron Johnson, Jr.
Jefferson LA USA

Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFGJ95KS9HxQb37XmcRAloBAKDC+j/yS4r6dQXiY2kKUQMXUaHtYgCggy+A
JIeqTvU4Q4zZR+gX9q/6mNk=
=bIOU
-----END PGP SIGNATURE-----

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Francisco Reyes (#1)
Re: Is it possible to move a database to another tablespace?

Francisco Reyes <lists@stringsutils.com> writes:

I see tables and indexes can be moved to a different tablespace.
Is there any way to move an entire database to a different tablespace?

No. Moving the system catalogs on-the-fly would be an interesting
problem ("uh, where did you say pg_class was? ... and I can't find its
indexes either?"). It could possibly be done, but the complexity would
be far out of proportion to the value I fear.

regards, tom lane