Separating the ro directory of the DB engine itself from the rw data areas . . .

Started by Albretch Muellerabout 15 years ago5 messagesgeneral
Jump to latest
#1Albretch Mueller
lbrtchx@gmail.com

~
I need to configure postgreSQL in a way that I could run it from a
directory mounted as read only, with separate rw partitions mounted
for the data, logs, . . .
~
What would be the steps to follow and the issues to take into consideration?
~
thanks
lbrtchx

#2Albretch Mueller
lbrtchx@gmail.com
In reply to: Albretch Mueller (#1)
Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

... better yet; is it possible to configure postgreSQL in a way that
it depends on external variables set via the OS in the same process
in which it is started?
~
lbrtchx

#3Jasen Betts
jasen@xnet.co.nz
In reply to: Albretch Mueller (#1)
Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

On 2011-01-24, Albretch Mueller <lbrtchx@gmail.com> wrote:

~
I need to configure postgreSQL in a way that I could run it from a
directory mounted as read only, with separate rw partitions mounted
for the data, logs, . . .
~
What would be the steps to follow and the issues to take into consideration?

first read through the main config file

as far as I know postgres doesn't need to write the main cluster
directory (/var/lib/postgres/8.4/main here - a debian variant)
only the subdirectories off it data,xlog etc...

--
⚂⚃ 100% natural

#4Jasen Betts
jasen@xnet.co.nz
In reply to: Albretch Mueller (#1)
Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

On 2011-01-24, Albretch Mueller <lbrtchx@gmail.com> wrote:

... better yet; is it possible to configure postgreSQL in a way that
it depends on external variables set via the OS in the same process
in which it is started?

Debian manages that somehow. I've got two 8.4 clusters running and
only one copy of the binaries installed, I think they use a
command-line option to specify the location of the config files.

--
⚂⚃ 100% natural

#5Andrew Sullivan
ajs@crankycanuck.ca
In reply to: Albretch Mueller (#2)
Re: Re: Separating the ro directory of the DB engine itself from the rw data areas . . .

On Mon, Jan 24, 2011 at 10:12:28PM +0000, Albretch Mueller wrote:

... better yet; is it possible to configure postgreSQL in a way that
it depends on external variables set via the OS in the same process
in which it is started?

Sure. Use the -D command-line switch or the $PGDATA environment variable.

A

--
Andrew Sullivan
ajs@crankycanuck.ca