dbTalk Databases Forums  

separating PG binaries into a ro mounted partition

comp.databases.postgresql comp.databases.postgresql


Discuss separating PG binaries into a ro mounted partition in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
lbrtchx@gmail.com
 
Posts: n/a

Default separating PG binaries into a ro mounted partition - 12-29-2007 , 08:43 PM






Hi,
~
I would like to separate all PG binaries from the created data for
tables, indexes (which could be written and updated to) and also from
the log files created by PG. Ideally I would like to be able to reset
those directories at run-time through environment variables and even
run PG from a CD-ROM
~
So I will need to include those a-la {$DATA_DIR} in conf files and
previously set them in an initial script
~
I know I will have to install PG from source, but I guess there is a
lot more I don't know about the installation procedures found in the /
postgresql-8.2.5/INSTALL notes, my ./configure stat should be like
this:
~

PG_INSTALL_DIR=<>
RM_DIR=<>

../configure
--prefix=$PG_INSTALL_DIR
--without-readline
--without-docdir
--mandir=$RM_DIR

rm $RM_DIR
~
I am planning to use the read-only mount feature and the append-only
attributes of the ext3 file system under Linux
~
Which other conf files will I have to tinker with?
~
Are there any best practices using these ideas for the installation
of PG?
~
Thanks
lbrtchx

Reply With Quote
  #2  
Old   
Laurenz Albe
 
Posts: n/a

Default Re: separating PG binaries into a ro mounted partition - 01-02-2008 , 02:26 AM






lbrtchx (AT) gmail (DOT) com wrote:
Quote:
I would like to separate all PG binaries from the created data for
tables, indexes (which could be written and updated to) and also from
the log files created by PG. Ideally I would like to be able to reset
those directories at run-time through environment variables and even
run PG from a CD-ROM
All sound PostgreSQL installations separate software and data.
In the standard installation, the database will be in /var/lib/pgsql/data,
and the software in /usr/bin and /usr/lib{64}/pgsql.

The WAL files (I assume you are talking about transaction logs here)
are traditionally in /var/lib/pgsql/data/pg_xlog, but you can keep
the WAL files somewhere else and create pg_xlog as a symbolic link.

About "resetting those directories at run-time through environment
variables": To create a new database cluster, you'll need to run "initdb".
To throw away an existing database cluster, it is sufficient to delete
all its files.

Quote:
So I will need to include those a-la {$DATA_DIR} in conf files and
previously set them in an initial script
I think it is easier than that.
If the mount point for your CD-ROM is /mnt/cdrom, just configure
PostgreSQL with ./configure --prefix=/mnt/cdrom. Then the software
will reside under this directory.

The location of your database is determined by the PGDATA environment
variable.

Quote:
I am planning to use the read-only mount feature and the append-only
attributes of the ext3 file system under Linux
No problem for the software.
Why "append-only" and not "immutable"?

Quote:
Which other conf files will I have to tinker with?
~
Are there any best practices using these ideas for the installation
of PG?
I don't think that you will meet a lot of problems.
This is a fairly standard way of installing and using PostgreSQL.

Yours,
Laurenz Albe


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.