pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
data_directory symlinks
2+ messages / 2 participants
[nested] [flat]

* data_directory symlinks
@ 2014-03-12 15:44  Kieren Scott <kierenscott@hotmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kieren Scott @ 2014-03-12 15:44 UTC (permalink / raw)
  To: pgsql-admin

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 Trustypg 9.3
Thanks in advance! 		 	   		  =

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: data_directory symlinks
@ 2014-03-12 16:47  Dhananjay Singh <dk_singh99@yahoo.com>
  parent: Kieren Scott <kierenscott@hotmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Dhananjay Singh @ 2014-03-12 16:47 UTC (permalink / raw)
  To: Kieren Scott <kierenscott@hotmail.com>; 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@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!

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2014-03-12 16:47 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2014-03-12 15:44 data_directory symlinks Kieren Scott <kierenscott@hotmail.com>
2014-03-12 16:47 ` Dhananjay Singh <dk_singh99@yahoo.com>

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