pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Installing PostgreSQL
6+ messages / 3 participants
[nested] [flat]

* Installing PostgreSQL
@ 2007-08-23 16:47 Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:08 ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
  2007-08-23 17:25 ` Re: Installing PostgreSQL Greg Smith <gsmith@gregsmith.com>
  0 siblings, 2 replies; 6+ messages in thread

From: Campbell, Lance @ 2007-08-23 16:47 UTC (permalink / raw)
  To: pgsql-performance

Should installation questions be sent here or to the admin listserv?

 

OS: redhat linux

Version of PostgreSQL: 8.2.4

 

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.  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.  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?

 

Thanks,

 

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu

 

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

* Re: Installing PostgreSQL
  2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
@ 2007-08-23 17:08 ` Richard Huxton <dev@archonet.com>
  2007-08-23 17:19   ` Re: Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  1 sibling, 1 reply; 6+ messages in thread

From: Richard Huxton @ 2007-08-23 17:08 UTC (permalink / raw)
  To: Campbell, Lance <lance@uiuc.edu>; +Cc: pgsql-performance

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



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

* Re: Installing PostgreSQL
  2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:08 ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
@ 2007-08-23 17:19   ` Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:26     ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
  0 siblings, 1 reply; 6+ messages in thread

From: Campbell, Lance @ 2007-08-23 17:19 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: 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@archonet.com] 
Sent: Thursday, August 23, 2007 12:08 PM
To: Campbell, Lance
Cc: pgsql-performance@postgresql.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



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

* Re: Installing PostgreSQL
  2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:08 ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
  2007-08-23 17:19   ` Re: Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
@ 2007-08-23 17:26     ` Richard Huxton <dev@archonet.com>
  2007-08-23 17:37       ` Re: Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  0 siblings, 1 reply; 6+ messages in thread

From: Richard Huxton @ 2007-08-23 17:26 UTC (permalink / raw)
  To: Campbell, Lance <lance@uiuc.edu>; +Cc: pgsql-performance

Campbell, Lance wrote:
> 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?

Yes - provided:
1. Ownership and permissions on the destination directory are correct
2. You remember to stop the server when copying


-- 
   Richard Huxton
   Archonet Ltd



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

* Re: Installing PostgreSQL
  2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:08 ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
  2007-08-23 17:19   ` Re: Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
  2007-08-23 17:26     ` Re: Installing PostgreSQL Richard Huxton <dev@archonet.com>
@ 2007-08-23 17:37       ` Campbell, Lance <lance@uiuc.edu>
  0 siblings, 0 replies; 6+ messages in thread

From: Campbell, Lance @ 2007-08-23 17:37 UTC (permalink / raw)
  To: Richard Huxton <dev@archonet.com>; +Cc: pgsql-performance

Richard,
I was able to prove that it works.  Thanks for your time.

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@archonet.com] 
Sent: Thursday, August 23, 2007 12:26 PM
To: Campbell, Lance
Cc: pgsql-performance@postgresql.org
Subject: Re: [PERFORM] Installing PostgreSQL

Campbell, Lance wrote:
> 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?

Yes - provided:
1. Ownership and permissions on the destination directory are correct
2. You remember to stop the server when copying


-- 
   Richard Huxton
   Archonet Ltd



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

* Re: Installing PostgreSQL
  2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
@ 2007-08-23 17:25 ` Greg Smith <gsmith@gregsmith.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Greg Smith @ 2007-08-23 17:25 UTC (permalink / raw)
  To: Campbell, Lance <lance@uiuc.edu>; +Cc: pgsql-performance

On Thu, 23 Aug 2007, Campbell, Lance wrote:

> Should installation questions be sent here or to the admin listserv?

admin or general would be more appropriate for this type of question.

> 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.

It's a partition of some sort.  lost+found shows up in the root directory 
of any partition you create, it's where damaged files found by fsck go. 
See http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/lostfound.html for 
more information.

> 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.

You will have to create subdirectory in this new partition in order for 
initdb to have a place it can work in.  What you should probably do here 
is have your administrator rename the mount point to something more 
generic, like "data" or "postgres", to avoid confusion here; then you'd 
have PGDATA pointing to data/pgsql_data or postgres/pgsql_data which won't 
be as confusing.

--
* Greg Smith gsmith@gregsmith.com http://www.gregsmith.com Baltimore, MD



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


end of thread, other threads:[~2007-08-23 17:37 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-08-23 16:47 Installing PostgreSQL Campbell, Lance <lance@uiuc.edu>
2007-08-23 17:08 ` Richard Huxton <dev@archonet.com>
2007-08-23 17:19   ` Campbell, Lance <lance@uiuc.edu>
2007-08-23 17:26     ` Richard Huxton <dev@archonet.com>
2007-08-23 17:37       ` Campbell, Lance <lance@uiuc.edu>
2007-08-23 17:25 ` Greg Smith <gsmith@gregsmith.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