X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 234FE5295D for ; Wed, 11 May 2005 19:26:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 03379-03 for ; Wed, 11 May 2005 22:26:02 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id EF72653623 for ; Wed, 11 May 2005 19:26:01 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j4BMPtwT024819; Wed, 11 May 2005 18:25:55 -0400 (EDT) To: Richard_D_Levine@raytheon.com Cc: Alex Turner , doug@mcnaught.org, "GGoshen@axsone.com" , pgsql-admin@postgresql.org, pgsql-general@postgresql.org Subject: Re: [GENERAL] Storing database in WORM devices In-reply-to: References: Comments: In-reply-to Richard_D_Levine@raytheon.com message dated "Wed, 11 May 2005 15:31:31 -0500" Date: Wed, 11 May 2005 18:25:55 -0400 Message-ID: <24818.1115850355@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.007 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200505/139 X-Sequence-Number: 17568 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