Thread: Postgresql DB on a live cd
Hi, I'am trying to create a demo cd (knoppix) with a jdbc application. This application uses a static (read-only, no insert, modify or delete) 200MB postgresql db, so can't put pgsql/data/base and pgsql/data/pg_xlog in ramdisk. postmaster fails to start because can't open the files in these two dirs with read and write access. The question is : can postmaster start only with read access ? Any alternative solutions ? Thank in advance, Lucio
On Wed, 19 Nov 2003, Lucio wrote: > Hi, > > I'am trying to create a demo cd (knoppix) with a jdbc application. > > This application uses a static (read-only, no insert, modify or delete) 200MB > postgresql db, so can't put pgsql/data/base and pgsql/data/pg_xlog in ramdisk. > > postmaster fails to start because can't open the files in these two dirs with > read and write access. > > The question is : can postmaster start only with read access ? > > Any alternative solutions ? Create a memory file system and mount that onto as the directory its trying to use?
> Create a memory file system and mount that onto as the directory its > trying to use? Hi Marc This is what Knoppix already makes: during boot creates /var/lib/pgsql as a link to a ramdisk (maybe do you mean something different with "memory fs" ?) Just now with pg_resetxlog (thanks god there's the net) I have cleared the pg_xlog dir: 112MB --> 16MB and this is a good first result. Still continue to experiment... Thanks and regards Lucio
Lucio wrote: > Hi, > > I'am trying to create a demo cd (knoppix) with a jdbc application. > > This application uses a static (read-only, no insert, modify or delete) 200MB > postgresql db, so can't put pgsql/data/base and pgsql/data/pg_xlog in ramdisk. One thing I don't think I saw mentioned yet.... I think some large sorts and temporary tables also use ..../base/[whatevernumber]/pgsql_tmp so you probably want to make that a symlink to something on the ramdisk as well.
Lucio wrote: > > This application uses a static (read-only, no insert, modify or delete) 200MB > postgresql db, so can't put pgsql/data/base and pgsql/data/pg_xlog in ramdisk. One thing I don't think I saw mentioned yet....I think certain queries create temporary tables (or at least use some temporary space) so ..../base/[whatevernumber]/pgsql_tmp should be a symlink to something on the ramdisk as well. (Kinda off-topic -- anecdotally it feels to me that some queries go faster if I put /pgsql_tmp on a different device & disk controller. If I verify this I'll post results to perform) Ron Mayer rm_pg@cheapcomplexdevices.com
Alle 09:47, giovedì 20 novembre 2003, Ron Mayer ha scritto: > One thing I don't think I saw mentioned yet....I think certain queries > create temporary tables (or at least use some temporary space) so > ..../base/[whatevernumber]/pgsql_tmp > should be a symlink to something on the ramdisk as well. > > (Kinda off-topic -- anecdotally it feels to me that some queries > go faster if I put /pgsql_tmp on a different device & disk controller. > If I verify this I'll post results to perform) > > Ron Mayer > rm_pg@cheapcomplexdevices.com Hi, ron Sorry, yesterday I was out for working. Ye, pgsql/data/base is in ramdisk. I have got to launch my live cd. After resetting pg_xlog, the pgsql dir is only 80MB (from 200MB). The requirements to run the live cd are now to 256MB RAM (sigh!!). Regards Lucio
> Create a memory file system and mount that onto as the directory its > trying to use? Hi Marc This is what Knoppix already makes: during boot creates /var/lib/pgsql as a link to a ramdisk (maybe do you mean something different with "memory fs" ?) Just now with pg_resetxlog (thanks god there's the net) I have cleared the pg_xlog dir: 112MB --> 16MB and this is a good first result. Still continue to experiment... Thanks and regards Lucio