Hello Boris, 

(In the Schipol lounge at the moment, so can't get into too many details, but): 
'Yes, Yes, and not quite...'! 

Quite easy to move the whole PostgreSQL 'Data Directory' en bloc; PG uses the 
term 'cluster' here. 


data location - as well as locations of logs - can easily be moved. You'd want 
to do this, in production, within your postgresql.conf file. 


As a quick test of your setup, you can use pg_ctl to start the server, while 
specifiying the cluster location directly with the '-D' option. IE, this can be 
as simple as: pg_ctl start -D /path/to/cluster 


Common gotcha in moving data? Be sure the postgresql process can write all the 
way through into the cluster directory. Various log messages will alert you to 
errors you may introduce in this area. 


In general, PostgreSQL is a _very_ robust and flexible install; you can tweak 
it as your needs dictate. 


For actually 'splitting' data, you'll be getting into tablespaces, sharing; 
things like this. Don't start there. We'll get to that! 


Ping me in a day if still having troubles. 


Lou Picciano 


(PS - I happen to be returning from the PostgreSQL Europe conference in Prague 
- good timing!) 

----- Original Message -----
From: "Boris Epstein" <borepst...@gmail.com> 
To: pgsql-admin@postgresql.org 
Sent: Thursday, October 25, 2012 8:17:44 PM 
Subject: [ADMIN] PostgreSQL 8.4 on OpenIndiana 

Hello listmates, 


I am trying to move the data directory for this PG installation. So one 
question would be, how do I do that? What's the accepted practice? 


And if I want to split the storage - i.e., put databases into different 
directories - can I do that? 


At this point I tried to just move the directory and use a soft link to repoint 
to it - but so far I have not even been able to do that properly, using pg_ctl. 
Apparently the process would not die. What should I look into to debug this 
one? 


Sorry I am asking all these questions - which are probably a bit dumb - but 
it's been about a decade since I've administered Postgres:) 


Thank you for any and all help, 


Cheers, 


Boris. 

Reply via email to