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