Skip site navigation (1) Skip section navigation (2)

Re: Installing Postgres

From: "Campbell, Lance" <lance(at)uiuc(dot)edu>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Installing Postgres
Date: 2007-08-23 19:38:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
In the end I set up the data directory as a subdirectory that had the
current version number of PostgreSQL in the name.  When I upgrade in the
future to a new version of PostgreSQL I will create a new data
subdirectory using the new version number in the name.  I will then load
that database from the prior version.  It will make falling back on a
prior version easier and more organized.  

I agree that using a subdirectory is a better strategy. 

It is nice to know that you can actually move the database by simply
moving the files.  That does assume you shut down the database first.

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois

-----Original Message-----
From: Tom Lane [mailto:tgl(at)sss(dot)pgh(dot)pa(dot)us] 
Sent: Thursday, August 23, 2007 1:42 PM
To: Campbell, Lance
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: [ADMIN] Installing Postgres 

"Campbell, Lance" <lance(at)uiuc(dot)edu> writes:
> The solution, based on emails I have received, is to install
> into a subdirectory called "data".  I then move the contents of "data"
> back a directory.  This way I am able to have the files in the
> I want them in.  Even though the directory I wanted them in contains a
> subdirectory.  This is how you get around the issue.


You appear to be impervious to several people telling you this is a
bad idea, but I will try one more time to explain why.  The reason you
see "lost+found" in that directory is that it is a volume mount point.
Volume mount point directories should *always* be owned by root, for
both reliability and security reasons.  The setup you are proposing
would have to have the mount point directory be postgres-owned.
You will live to regret that if you insist on doing it that way
(in fact, I'm astonished your sysadmin agreed to it in the first
place ... he must be pretty new at his job).

Stick with the extra level of directory.

> It appears that
> the PostgreSQL data directory contents can be moved.

Yeah, they can.  The argument here is about exactly where you are
proposing to move them to.  If it were an ordinary directory it'd be

			regards, tom lane

In response to


pgsql-admin by date

Next:From: Chander GanesanDate: 2007-08-23 21:59:44
Subject: Re: Logging the starting and stopping of PostgreSQL
Previous:From: Campbell, LanceDate: 2007-08-23 19:17:17
Subject: Logging the starting and stopping of PostgreSQL

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group