kraada wrote:You can't quite move the entire folder and do nothing else - you would want to just move the data subfolder and then you would need to edit the postgresql.conf file and set the line for "data directory" to point to your new location (and make sure there's no # at the front of the line).
Another option is to create a tablespace on the new disk then alter your database to set it to use the new tablespace - that would move an individual database off into your new location. For more on tablespaces and creating them see
this post.
I want to try the first option but I'm not sure where do I have to add the directory
I opened the postgresql.conf file with notepad and this is where I see the "data directory" :
(copied from the file)
________________________________________________________________
#data_directory = 'ConfigDir' # use data in another directory
# (change requires restart)
#hba_file = 'ConfigDir/pg_hba.conf' # host-based authentication file
# (change requires restart)
#ident_file = 'ConfigDir/pg_ident.conf' # ident configuration file
# (change requires restart)
# If external_pid_file is not explicitly set, no extra PID file is written.
#external_pid_file = '(none)' # write an extra PID file
# (change requires restart)
_________________________________________________________________
Is it in one of these lines where I have to add it? :P Thank you again.
Also, this postgresql.conf file is in the Data subfolder not anywhere else in the PostgreSQL folder. Should this file be in both partitions, in the Data folder that I moved over and the PostgreSQL folder that is now without the Data subfolder?