From: Tom Lane <tgl@sss.pgh.pa.us>
To: Richard_D_Levine@raytheon.com
Cc: Alex Turner <armtuk@gmail.com>
Cc: doug@mcnaught.org, "GGoshen@axsone.com" <GGoshen@axsone.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] Storing database in WORM devices
Date: Wed, 11 May 2005 18:25:55 -0400
Message-ID: <24818.1115850355@sss.pgh.pa.us> (raw)
In-Reply-To: <OF7A25D37C.58B08448-ON05256FFE.00707909-05256FFE.0070BFA7@ftw.us.ray.com>
References: <OF7A25D37C.58B08448-ON05256FFE.00707909-05256FFE.0070BFA7@ftw.us.ray.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, Richard_D_Levine@raytheon.com, armtuk@gmail.com, GGoshen@axsone.com, pgsql-general@postgresql.org
Subject: Re: [GENERAL] Storing database in WORM devices
In-Reply-To: <24818.1115850355@sss.pgh.pa.us>
References: <OF7A25D37C.58B08448-ON05256FFE.00707909-05256FFE.0070BFA7@ftw.us.ray.com> <24818.1115850355@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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