Re: migrating/spliting Postgres data directory on OpenIndiana - Mailing list pgsql-general

From Thomas Munro
Subject Re: migrating/spliting Postgres data directory on OpenIndiana
Date
Msg-id CADLWmXW7m_7P0nUbGJcbDimMHDrfsBkizKhi4xp0umbX8Fy=qg@mail.gmail.com
Whole thread Raw
In response to migrating/spliting Postgres data directory on OpenIndiana  (Boris Epstein <borepstein@gmail.com>)
List pgsql-general
On 25 October 2012 19:46, Boris Epstein <borepstein@gmail.com> wrote:
> And if I want to split the storage - i.e., put databases into different
> directories - can I do that?

Take a look at the tablespace feature:

http://www.postgresql.org/docs/current/static/sql-createtablespace.html

You can move existing tables with ALTER TABLE (likewise for indexes),
and change the default for new tables created in future in a database
with ALTER DATABASE:

http://www.postgresql.org/docs/9.2/static/sql-altertable.html
http://www.postgresql.org/docs/9.2/static/sql-alterdatabase.html

Before the tablespace feature was added, people used to create
symlinks in the data directory if they wanted to use different storage
for different objects (say, a special fast disk array for certain
data).  The tablespace feature actually works the same way, but it's
managed for you via DDL commands.

Hope that helps,
Thomas


pgsql-general by date:

Previous
From: "Xiong He"
Date:
Subject: Re: migrate from PostgreSQL to Oracle
Next
From: John R Pierce
Date:
Subject: Re: migrating/spliting Postgres data directory on OpenIndiana