Skip site navigation (1) Skip section navigation (2)

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

From: "Scott Marlowe" <scott(dot)marlowe(at)gmail(dot)com>
To: "David Young" <randomfire(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Is there an easy and safe way to migrate a database to a new tablespace?
Date: 2007-12-03 21:22:05
Message-ID: dcc563d10712031322v5bf57efcj7060881beb67504a@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
On Nov 26, 2007 3:05 PM, David Young <randomfire(at)gmail(dot)com> 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.

In response to

Responses

pgsql-admin by date

Next:From: AldorDate: 2007-12-04 11:01:12
Subject: Cannot kill autovacuum
Previous:From: Tommy ChengDate: 2007-12-03 10:21:09
Subject: How to identify the current WAL segment file

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group