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:26:46
Message-ID: 819df3760811171426q27c1646g72b3ac7f662d2372@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sorry I forgot about create tablespace script - this is the SQL script:

CREATE TABLESPACE ram_space LOCATION '/mnt/ram0/pgspace';

And then:

CREATE TABLE (...) TABLESPACE ram_space;

and table is in memory.

Regards,
Blazej

2008/11/17 Blazej <bl(dot)oleszkiewicz(at)gmail(dot)com>:
> 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 Scott Marlowe 2008-11-17 23:05:07 Re: In memory Database for postgres
Previous Message Blazej 2008-11-17 22:16:50 Re: citing postgresql