pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dhananjay Singh <dk_singh99@yahoo.com>
To: Kieren Scott <kierenscott@hotmail.com>
To: pgsql-admin@postgresql.org <pgsql-admin@postgresql.org>
Subject: Re: data_directory symlinks
Date: Thu, 13 Mar 2014 00:47:47 +0800 (SGT)
Message-ID: <1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com> (raw)
In-Reply-To: <DUB127-W24399E9071F1865BDAA8DCAE760@phx.gbl>
References: <DUB127-W24399E9071F1865BDAA8DCAE760@phx.gbl>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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@hotmail.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!

view thread (2+ messages)

Message-ID: <1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com>
Permalink:  ../1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com/
Also on:    postgresql.org/message-id/1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: dk_singh99@yahoo.com, kierenscott@hotmail.com
  Subject: Re: data_directory symlinks
  In-Reply-To: <1394642867.32444.YahooMailNeo@web193603.mail.sg3.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox