Re: Re: Would a PostgreSQL database on a DVD be usable? - Mailing list pgsql-general

From Tom Lane
Subject Re: Re: Would a PostgreSQL database on a DVD be usable?
Date
Msg-id 26485.997144818@sss.pgh.pa.us
Whole thread Raw
In response to Re: Re: Would a PostgreSQL database on a DVD be usable?  (Andrew Gould <andrewgould@yahoo.com>)
List pgsql-general
Andrew Gould <andrewgould@yahoo.com> writes:
> Am I understanding this correctly that it can (should)
> work if:

> 1. I burn the database directory to the CD/DVD; and

> 2. The user mounts the CD/DVD and creates a symbolic
> link in /usr/local/pgsql/data/base/ to the database
> directory on the CD/DVD; and uses the existing log
> directory; and

> 3. Restarts the postmaster daemon?

I believe so, *but* be sure to do a complete VACUUM and then shut down
the postmaster (CHECKPOINT should be sufficient in theory, but shutdown
is a lot safer) before you copy the database directory to CD.  You need
the VACUUM to update on-row tuple status bits, else you will get runtime
failures when the system tries to update out-of-date status bits in what
it will find is a read-only file.

A possible problem is that Postgres will try to open the files in
read-write mode, even if it never actually issues a write.  If your
kernel only accepts read-only opens for files on a read-only volume,
this might not work.

            regards, tom lane

pgsql-general by date:

Previous
From: "Dr. Evil"
Date:
Subject: Re: Would a PostgreSQL database on a DVD be usable?
Next
From: Dave Smith
Date:
Subject: Re: Installing PostgreSQL 7.1.2 on SCO Open Server 5.0.5