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.htmlhttp://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