Richard_D_Levine@raytheon.com writes:
> Tom Lane suggested a vacuum freeze (? or something like that) for archival
> read only data. I got the impression the template databases are freeze
> dried for freshness (good to the last bit?) That feature might help as
> well in the transition from read-write to read-only.
Yes, you'd definitely need to do that before you could hope to put a
table on read-only storage. Other issues to think about:
- pg_xlog and pg_clog are NEVER read-only
- temp files, which are normally made in a database's default
tablespace
In PG 8.0 it should be pretty easy to vacuum freeze all the tables in a
tablespace (that is not the default tablespace of its database) and then
copy the tablespace directory tree to CD and hack the symlink for it.
I have not actually tried that but in theory it should work. Don't
forget to checkpoint or stop the server before trying to copy files.
It might work to freeze a database's default tablespace in the same
way, if you first change the pgsql_tmp subdirectory into a symlink that
points somewhere that will be writable. I'm not totally sure of this
though (the relcache init file in particular is something that could
burn you).
The main problem with any of this of course is the tight tie between
the read-only and read-write parts of the database. You couldn't,
say, take the WORM device and mount it in another PG installation and
expect usable results.
regards, tom lane