pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedseparating PG binaries into a ro mounted partition
4+ messages / 3 participants
[nested] [flat]
* separating PG binaries into a ro mounted partition
@ 2007-12-30 02:40 Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 05:41 ` Re: separating PG binaries into a ro mounted partition Phillip Smith <phillip.smith@weatherbeeta.com.au>
0 siblings, 1 reply; 4+ messages in thread
From: Albretch Mueller @ 2007-12-30 02:40 UTC (permalink / raw)
To: pgsql-admin
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. Idealy 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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: separating PG binaries into a ro mounted partition
2007-12-30 02:40 separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
@ 2007-12-30 05:41 ` Phillip Smith <phillip.smith@weatherbeeta.com.au>
2007-12-30 11:23 ` Re: separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Phillip Smith @ 2007-12-30 05:41 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-admin
What are you trying to acheive by making the binaries read-only?
All the config files reside in the data directory so there shoudl be a
problem making /usr/local/postgres/bin (or whatever you choose to
install the binaries) to be a read-only mounted partition. The other
option (which is far easier) would be to set the binaries immutable. As
root, run this:
chattr +i /use/local/postgres/bin/*
That way only root can remove the immutable flag so they can be changed
- if it's a security issue behind your desire to do this then it doesn't
matter that root can do that versus your suggestion as root would be
able to just remount the partition rw:
mount -o remount,rw /usr/local/postgres
If you can advise why you want them to be read-only then we can make
better suggestions.
Cheers,
~p
THINK BEFORE YOU PRINT - Save paper if you don't really need to print this
*******************Confidentiality and Privilege Notice*******************
The material contained in this message is privileged and confidential to
the addressee. If you are not the addressee indicated in this message or
responsible for delivery of the message to such person, you may not copy
or deliver this message to anyone, and you should destroy it and kindly
notify the sender by reply email.
Information in this message that does not relate to the official business
of Weatherbeeta must be treated as neither given nor endorsed by Weatherbeeta.
Weatherbeeta, its employees, contractors or associates shall not be liable
for direct, indirect or consequential loss arising from transmission of this
message or any attachments
e-mail.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: separating PG binaries into a ro mounted partition
2007-12-30 02:40 separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 05:41 ` Re: separating PG binaries into a ro mounted partition Phillip Smith <phillip.smith@weatherbeeta.com.au>
@ 2007-12-30 11:23 ` Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 15:50 ` Re: separating PG binaries into a ro mounted partition Usama Dar <munir.usama@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Albretch Mueller @ 2007-12-30 11:23 UTC (permalink / raw)
To: pgsql-admin; +Cc: phillip.smith@weatherbeeta.com.au
> Phillip Smith <phillip.smith@weatherbeeta.com.au> wrote:
> What are you trying to acheive by making the binaries read-only?
~
* convinience: If I have PG on a baseline Linux distro running from a
USB stick or CD (or a mini-DVD) and I go around with my micro drive, I
could just sit anywhere they have a PC with a USB port or CD-player
and an available USB/or firewire port for my micro device.
~
This is why I need to also be able to configure the mount point my
PGDATA will be in. I have done that before with mysql and it works
just fine, but PG is more appealing for me because it has features I
need and it is more committed to java.
~
* security: I could go anywhere knowing that as long as I
mount/configure PG and other apps I have, such as tomcat, as read-only
it is impossibly hard for people to alter my files even though they
could tinker with the BIOS and RAM
~
Also config files could stay where they be, because they
don't/shouldn't change as PG runs. I only need to put in a separate
writable (&/|| updatable) and appendable filesystem areas all other
data
~
So, what are the installation options to acheive what I specified in the OP?
~
thanks
lbrtchx
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: separating PG binaries into a ro mounted partition
2007-12-30 02:40 separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 05:41 ` Re: separating PG binaries into a ro mounted partition Phillip Smith <phillip.smith@weatherbeeta.com.au>
2007-12-30 11:23 ` Re: separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
@ 2007-12-30 15:50 ` Usama Dar <munir.usama@gmail.com>
0 siblings, 0 replies; 4+ messages in thread
From: Usama Dar @ 2007-12-30 15:50 UTC (permalink / raw)
To: Albretch Mueller <lbrtchx@gmail.com>; +Cc: pgsql-admin; phillip.smith@weatherbeeta.com.au
>
>
> So, what are the installation options to acheive what I specified in the
> OP?
>
Did you go through this?
http://www.postgresql.org/docs/8.2/static/install-procedure.html
--
Usama Munir Dar http://www.linkedin.com/in/usamadar
Consultant Architect
Cell:+92 321 5020666
Skype: usamadar
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-12-30 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-12-30 02:40 separating PG binaries into a ro mounted partition Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 05:41 ` Phillip Smith <phillip.smith@weatherbeeta.com.au>
2007-12-30 11:23 ` Albretch Mueller <lbrtchx@gmail.com>
2007-12-30 15:50 ` Usama Dar <munir.usama@gmail.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