Re: Installing PostgreSQL

From: "Campbell, Lance" <lance(at)uiuc(dot)edu>
To: "Richard Huxton" <dev(at)archonet(dot)com>
Cc: <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Installing PostgreSQL
Date: 2007-08-23 17:19:25
Message-ID: B10E6810AC2A2F4EA7550D072CDE8760197D2D@SAB-FENWICK.sab.uiuc.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Richard,
So what you are saying is that if you install PostgeSQL into a data
directory /abc/data you could then stop the database, move the files
into /def/data, and then start the database making sure to point to the
new data directory. PostgreSQL is therefore referencing its files
relative to the "data" directory the files are in.

Is this a correct observation?

Thanks,

Lance Campbell
Project Manager/Software Architect
Web Services at Public Affairs
University of Illinois
217.333.0382
http://webservices.uiuc.edu

-----Original Message-----
From: Richard Huxton [mailto:dev(at)archonet(dot)com]
Sent: Thursday, August 23, 2007 12:08 PM
To: Campbell, Lance
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Installing PostgreSQL

Campbell, Lance wrote:
> Should installation questions be sent here or to the admin listserv?

Probably the pgsql-general/admin/novice lists

> OS: redhat linux

RHES?

> Version of PostgreSQL: 8.2.4

OK

> I had a group that now manages our server set up a directory/partition
> for us to put postgreSQL into. The directory is called pgsql_data.
The
> directory is more than a regular directory. It contains a
subdirectory
> called "lost+found". I would assume this is a logical partition.

No - if you get filesystem corruption any recovered disk-blocks are put
into files here. All your disk partitions will have such a directory.

> I
> tried installing postgreSQL directly into this directory but it failed
> since there is a file in this directory, "lost+found". Is there a way
> around this? Worst case scenario I will create a subdirectory called
> data and put the install in there.

That's what you want to do. Apart from anything else it lets you set
ownership & permission of the directory.

> I would have preferred to put it
> directly into the pgsql_data. There would be no other files that
would
> have gone into the directory/partition other than postgreSQL. Would
it
> be possible for me to install postgreSQL into a sub directory of
> pgsql_data and then move the files up a directory into pgsql_data?

Just symlink your directory to the correct place if that's what you
want.

Partition at: /mnt/pg_disk
Directory is: /mnt/pg_disk/data
symlink to: /var/db/data

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2007-08-23 17:25:42 Re: Installing PostgreSQL
Previous Message Kevin Kempter 2007-08-23 17:16:57 long-running query - needs tuning