Re: Is there an easy and safe way to migrate a database to a new tablespace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Nov 26, 2007 3:05 PM, David Young <randomfire@xxxxxxxxx> wrote:
> Hi,
>
> I recently converted to using a postgresql engine that support tablespaces.
> There's a database that I would like to move to a new tablespace for
> performance reasons.  What is the safe and correct way of doing this?  The
> documentation is a bit sketchy on this.

I think you'd have to first set a new default_tablespace for the db,
then you'd have to write a script to go through each object and move
it with an alter (table|index) to the new tablespace.

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at

                http://www.postgresql.org/about/donate

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux