Re: In memory Database for postgres

From: Blazej <bl(dot)oleszkiewicz(at)gmail(dot)com>
To: avin_friends(at)yahoo(dot)com
Cc: "postgresql Forums" <pgsql-general(at)postgresql(dot)org>
Subject: Re: In memory Database for postgres
Date: 2008-11-17 22:02:54
Message-ID: 819df3760811171402s57bfb213q1babbf5037af543d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In my opinion very nice solution is building part of PostgreSQL
database in memory - below it is instruction how to build PostgreSQL
schema in memory in Linux. I tested this with my ROLAP solution for
recalculation MOLAP cubes in memory and then join with master cube
(this speeds up proces about 10 times!!! - but in other solution may
be different).

In grub (or other bootloader) you must declare ramdisk and then in OS:

mke2fs /dev/ram0
mkdir /mnt/ram0
mount /dev/ram0 /mnt/ram0
mkdir /mnt/ram0/pgspace

chown postgres:postgres /mnt/ram0/pgsapce

The "/mnt/ram0/pgsapce" folder must be empty (ERROR: directory
"/mnt/ram0" is not empty)

And then you may create tables (in this schema of course) and write to them.

Of course you must delete schema before shutdown PostgreSQL and OS - I
dont't now how resolve problem with error when the schema was not
deleted? - I have no time to think about it maybe anybody know how to
restore db when the in memory schema was damaged?

Regards,
Blazej

2008/11/17 aravind chandu <avin_friends(at)yahoo(dot)com>:
> Hello,
>
> I guess most of you guys heard about In Memory Database.I have
> a small question regarding it.I need to create an In Memory Database for
> postgresql through which I have to perform various operations on postgresql
> database(queries,procedures,programs using pqxx API etc...).I didn't have
> any idea of how to start and where to start this issue.Please comment on
> this issue,so that it will be really helpful to me .
>
> Thanks,
> Avin.
>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Blazej 2008-11-17 22:16:50 Re: citing postgresql
Previous Message Scott Marlowe 2008-11-17 21:31:53 Re: Fwd: Performance Tuning