Thread: Running postgres on a read-only file system

Running postgres on a read-only file system

From
"Tyler Mitchell"
Date:
Hello, I haven't been able to finding information on this, or at least I
haven't known the right keywords to search for.
We are trying to make  a fully contained, CD-runable version of postgres.
The only problem we are really having is the locking of the database files
in the PGDATA folder.  Since the PGDATA folder is on the CD (i.e.
read-only) this will not work.  Can you direct me to either other resources
to read or at least point me to the settings/functionality that I need to
learn more about?  Or better yet could you give me some guidance on how to
get around this.  The simpler the solution the better (i.e. postmaster
options, environment variables, etc.).

Tyler



Re: Running postgres on a read-only file system

From
Andrew Sullivan
Date:
On Thu, Aug 29, 2002 at 01:28:56PM -0700, Tyler Mitchell wrote:
> Hello, I haven't been able to finding information on this, or at least I
> haven't known the right keywords to search for.
> We are trying to make  a fully contained, CD-runable version of postgres.

Some time ago (like > 2 years, I believe), on the list, someone did
this.  It was ugly, IIRC.  Postgres wants to write files somewhere,
and it will be very unhappy if it can't.

A

--
----
Andrew Sullivan                         204-4141 Yonge Street
Liberty RMS                           Toronto, Ontario Canada
<andrew@libertyrms.info>                              M2P 2A8
                                         +1 416 646 3304 x110


Re: Running postgres on a read-only file system

From
Tom Lane
Date:
"Tyler Mitchell" <TMitchell@lignum.com> writes:
> We are trying to make  a fully contained, CD-runable version of postgres.
> The only problem we are really having is the locking of the database files
> in the PGDATA folder.  Since the PGDATA folder is on the CD (i.e.
> read-only) this will not work.

You can say that again.

> Or better yet could you give me some guidance on how to
> get around this.

Put PGDATA on a writable volume.  RAM disk, maybe.

            regards, tom lane

Re: Running postgres on a read-only file system

From
Robert Treat
Date:
On Fri, 2002-08-30 at 00:11, Tom Lane wrote:
> "Tyler Mitchell" <TMitchell@lignum.com> writes:
> > We are trying to make  a fully contained, CD-runable version of postgres.
> > The only problem we are really having is the locking of the database files
> > in the PGDATA folder.  Since the PGDATA folder is on the CD (i.e.
> > read-only) this will not work.
>
> You can say that again.
>
> > Or better yet could you give me some guidance on how to
> > get around this.
>
> Put PGDATA on a writable volume.  RAM disk, maybe.
>

This is only slightly more helpful, and maybe not even, but if you look
around there are a couple of linux distros that run completely off of a
CD-ROM (I tested a couple a couple of years ago). They set up a "virtual
filesystem" of sorts to allow people to browse the web and accept
cookies and other various items. If you can find one of these distros
you might be able to get a jump start on setting something like that up.

Robert Treat