Re: data_directory symlinks

From: Dhananjay Singh <dk_singh99(at)yahoo(dot)com>
To: Kieren Scott <kierenscott(at)hotmail(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: data_directory symlinks
Date: 2014-03-12 16:47:47
Message-ID: 1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Either way is good. You can either create symlinks or move data directory to new mount point. Both will work fine.
You can also use use pg_ctl -D to point to new data_directory.

Regards
Dhananjay
OpenSCG

On Wednesday, 12 March 2014 9:15 PM, Kieren Scott <kierenscott(at)hotmail(dot)com> wrote:


Hi

By default pg_createcluster will create a new cluster in /var/lib/postgresql/<version>/<cluster>

I wan't to move my data_directory from this location to another volume (with lots more space). Is it best practice to set the data_directory location --datadir with pg_createcluster, or to just move the data_directory contents to the new volume and then create a symbolic link (as postgres) from /var/lib/postgresql/<version>/ to the new volume? This seems to be essentially the same thing, but I wondered if there were any gotcha's with using symbolic links in this way (e.g. if we tried to run multiple clusters on one host), rather than specifying the data_directory at pg_createcluster time - which subsequently sets this parameter in the postgresql.conf?

Ubuntu Trusty
pg 9.3

Thanks in advance!

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gabriele Lohss 2014-03-13 13:56:27 Restore for Hot Standby: could not restore file return code 32256
Previous Message Kieren Scott 2014-03-12 15:44:09 data_directory symlinks