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