Unix Technical Forum

read-only database on CD-ROM?

This is a discussion on read-only database on CD-ROM? within the pgsql Admins forums, part of the PostgreSQL category; --> Is it possible to set up a read-only database on external data carrier such as CD-ROM or DVD? I ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 01:36 AM
Dragan Matic
 
Posts: n/a
Default read-only database on CD-ROM?

Is it possible to set up a read-only database on external data carrier
such as CD-ROM or DVD? I couldn't find anything similar in postgres
documentation. I have an old database which I would like to put on to
CD-ROM and to be able to read it occasionaly. I appreciate any hint if
that would be possible or link to documentation.
Thanks in advance

Dragan Matic


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 01:36 AM
Tom Lane
 
Posts: n/a
Default Re: read-only database on CD-ROM?

Dragan Matic <mlists@panforma.co.yu> writes:
> Is it possible to set up a read-only database on external data carrier
> such as CD-ROM or DVD?


It's not really supported. I think you could make it work if you did
VACUUM FREEZE in the database, and then CHECKPOINT, just before burning
it on CD. You can *not* put a whole $PGDATA directory on CD, as the
xlog and clog have to be writable; but you could put one database
subdirectory there. (It would be a lot easier to use 8.0 and make the
moved-out tree a tablespace, probably.)

A big caveat is that I'm not sure the CD would work if attached to a
different $PGDATA tree, as for instance after a reinstallation. It
could definitely not be counted on to work across PG version upgrades.
So all in all the answer is probably "not worth the trouble".

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 01:36 AM
Geoffrey
 
Posts: n/a
Default Re: read-only database on CD-ROM?

Tom Lane wrote:
> Dragan Matic <mlists@panforma.co.yu> writes:
>
>>Is it possible to set up a read-only database on external data carrier
>>such as CD-ROM or DVD?

>
>
> It's not really supported. I think you could make it work if you did
> VACUUM FREEZE in the database, and then CHECKPOINT, just before burning
> it on CD. You can *not* put a whole $PGDATA directory on CD, as the
> xlog and clog have to be writable; but you could put one database
> subdirectory there. (It would be a lot easier to use 8.0 and make the
> moved-out tree a tablespace, probably.)


What about making xlog and clog sym links?
>
> A big caveat is that I'm not sure the CD would work if attached to a
> different $PGDATA tree, as for instance after a reinstallation. It
> could definitely not be counted on to work across PG version upgrades.
> So all in all the answer is probably "not worth the trouble".


Oh, come on Tom, sounds like a fun thing to try....

--
Until later, Geoffrey

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:30 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com