Moving postgres data folder on NFS drive. Is it better to symlink, reinit cluster, or modify init.d script?
Solution 1:
You can simply shut down Postgres, move the folder over and change the init scripts to point to the correct location for the data directory. Double-check the configuration files under data/
for references to the old path before restarting the server.
You probably don't want to do this. Really. It's a BAD idea.
NFS's other name is the Network Failure System. It is not known for its reliability, and having the underlying filesystem go away at an inopportune time (e.g. when appending to the WAL) could really ruin your day, not to mention your database. Remember that Postgres does nothing special for NFS, and will freak out if something unexpected happens (see 17.2.1 in the Postgres manual).
Perhaps if you describe the underlying problem you're trying to solve (ask a new question) we can help you do so in a less risky way?