Lists: | pgsql-admin |
---|
From: | "Christian Gerdes" <christian(dot)gerdes(at)exai(dot)de> |
---|---|
To: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Databases in memory (-->flashdrive problem) |
Date: | 2002-04-11 15:07:11 |
Message-ID: | 45CE8A6EF04DF14082405BEE982CE70E031859@2000-eka-exc-03.EKATEC.COM |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
Hi all together,
i hope i'm at right list...
Is there an opportunity to configure postgre to keep databases in Memory?
I need to store a lot of data (many little entries) on IDE- flashdrive.
But flashdrives have a little problem with write-cycles.
Each flash-cell can be rewritten approxiatly 300.000 times. This means for me:
there is no chance to store my db directly on flashdrive.
If i could let my databases stay in RAM (maybe RAM-Drive, if so) i may do a backup to flashdrive in a defined frequency!?
Some thoughts? Please give me some hints...
tia
Christian
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Christian Gerdes" <christian(dot)gerdes(at)exai(dot)de> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Databases in memory (-->flashdrive problem) |
Date: | 2002-04-15 17:40:22 |
Message-ID: | 24596.1018892422@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
"Christian Gerdes" <christian(dot)gerdes(at)exai(dot)de> writes:
> Is there an opportunity to configure postgre to keep databases in Memory?
> I need to store a lot of data (many little entries) on IDE- flashdrive.
> But flashdrives have a little problem with write-cycles.
> Each flash-cell can be rewritten approxiatly 300.000 times. This means for me:
> there is no chance to store my db directly on flashdrive.
> If i could let my databases stay in RAM (maybe RAM-Drive, if so) i may do a backup to flashdrive in a defined frequency!?
Sure: keep the database on a RAM-drive (this will mean an initdb and
data load on each bootup, hope you can stand that) and use pg_dump to
a text file on flashdrive as your backup mechanism. Use a cron task
to run pg_dump at whatever frequency suits you.
regards, tom lane
From: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
---|---|
To: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Databases in memory (-->flashdrive problem) |
Date: | 2002-04-15 19:20:27 |
Message-ID: | Pine.LNX.4.21.0204152018180.20382-100000@ponder.fairway2k.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
On Mon, 15 Apr 2002, Tom Lane wrote:
> "Christian Gerdes" <christian(dot)gerdes(at)exai(dot)de> writes:
> > Is there an opportunity to configure postgre to keep databases in Memory?
> > I need to store a lot of data (many little entries) on IDE- flashdrive.
> > But flashdrives have a little problem with write-cycles.
> > Each flash-cell can be rewritten approxiatly 300.000 times. This means for me:
> > there is no chance to store my db directly on flashdrive.
>
> > If i could let my databases stay in RAM (maybe RAM-Drive, if so) i may do a backup to flashdrive in a defined frequency!?
>
> Sure: keep the database on a RAM-drive (this will mean an initdb and
> data load on each bootup, hope you can stand that) and use pg_dump to
> a text file on flashdrive as your backup mechanism. Use a cron task
> to run pg_dump at whatever frequency suits you.
Wouldn't it be possible/better to just do recursive filesystem copy between RAM
drive and the flash drive?
Obviously that would be before starting postmaster and after stopping it using
cpio or whatever tool is prefered.
--
Nigel J. Andrews
Director
---
Logictree Systems Limited
Computer Consultants
From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Nigel J(dot) Andrews" <nandrews(at)investsystems(dot)co(dot)uk> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: Databases in memory (-->flashdrive problem) |
Date: | 2002-04-16 13:53:00 |
Message-ID: | 11839.1018965180@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-admin |
"Nigel J. Andrews" <nandrews(at)investsystems(dot)co(dot)uk> writes:
>> Sure: keep the database on a RAM-drive (this will mean an initdb and
>> data load on each bootup, hope you can stand that) and use pg_dump to
>> a text file on flashdrive as your backup mechanism. Use a cron task
>> to run pg_dump at whatever frequency suits you.
> Wouldn't it be possible/better to just do recursive filesystem copy
> between RAM drive and the flash drive?
> Obviously that would be before starting postmaster and after stopping
> it using cpio or whatever tool is prefered.
You could do it that way. I like the pg_dump idea better, because
(a) you can take a pg_dump snapshot without stopping the database, and
(b) the pg_dump output will likely be smaller than the raw database
files. However, the recursive copy would allow faster startup at
system boot (recursive copy back to RAMdisk is probably faster than
initdb + load pg_dump script --- though this assumption should be
tested). You pays your money and you takes your choice...
regards, tom lane