[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [debian-knoppix] postgres database



>From Vincent Hermenier on Thursday, 2004-03-25 at 12:09:57 +0100:
> Hi,
> 
> I have remastered a knoppix that includes a postgres database.
> 
> On my first try, I've had problems due to the fact that the database was 
> stored on a read-only medium, and that even if I actually didn't want to 
> write in the database but just access it (this database will only be 
> accessed).
> 
> So I have decided to store the data folder (/var/lib/postgres/data) as a 
> tarball that is uncompressed during the booting sequence. As a consequence, 
> it is entirely stored in the ramdisk.
> 
> The problem is that the data folder I have is over 100Mo (even after having 
> done a reset of the xlogs). You can well imagine the problems I experiment on 
> poor configurations :-)
> 
> I was wondering if you had any ideas on how to improve this.

I have no insight into this problem from a postgres point of view,
so I will ask some questions and make an alternative suggestion.

Obviously the cleanest method would be if postgres permitted you
to read the data from a read-only medium.  What is the problem,
exactly?  Does postgres need write access to write some log files,
or is the problem deeper than that?  Can you find some way to
write only the log files to ramdisk?

You could start by doing some experiments with a hard disk based 
postgres database.  Make parts of it read-only, and see where you 
run into trouble!  Start small (maybe just one file) and continue.

The alternative would be to store the data not on ramdisk, but
on the hard disk.  With the help of captive (a very recent
technology) you can even write to NTFS-formated partitions,
so in principle you should be able to use any hard disk,
so long as it has 100Mo available.  

You could even give the option of having a "persistent database" 
on the hard disk, so that the process of uncompressing and 
writing the database to hard disk does not have to be repeated.

Conrad

_______________________________________________
debian-knoppix mailing list
debian-knoppix@linuxtag.org
http://mailman.linuxtag.org/mailman/listinfo/debian-knoppix


Reply to: