Re: Postgres as In-Memory Database?

From: Stefan Keller <sfkeller(at)gmail(dot)com>
To: Edson Richter <edsonrichter(at)hotmail(dot)com>
Cc: pgsql-general List <pgsql-general(at)postgresql(dot)org>
Subject: Re: Postgres as In-Memory Database?
Date: 2013-11-17 21:26:21
Message-ID: CAFcOn2_v3WyCM68iYai5YQ2QKJxv7PJ=KoREteG29Jv2Sk_eew@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi Edson

As Rob wrote: Having a feature like an in-memory table like SQLite has [1]
would make application cahces obsolete and interesting to discuss (but that
was'nt exactly what I asked above).

--Stefan

[1] http://www.sqlite.org/inmemorydb.html
[2] http://www.postgresql.org/docs/9.1/static/non-durability.html

2013/11/17 Edson Richter <edsonrichter(at)hotmail(dot)com>

> Em 17/11/2013 12:15, rob stone escreveu:
>
>
>> On Sun, 2013-11-17 at 12:25 +0100, Stefan Keller wrote:
>>
>>> How can Postgres be used and configured as an In-Memory Database?
>>>
>>>
>>> Does anybody know of thoughts or presentations about this "NoSQL
>>> feature" - beyond e.g. "Perspectives on NoSQL" from Gavin Roy at PGCon
>>> 2010)?
>>>
>>>
>>> Given, say 128 GB memory or more, and (read-mostly) data that fit's
>>> into this, what are the hints to optimize Postgres (postgresql.conf
>>> etc.)?
>>>
>>>
>>> -- Stefan
>>>
>> Not as being completely "in memory".
>> Back in the "good ol'days" of DMS II (written in Algol and ran on
>> Burroughs mainframes) and Linc II (also Burroughs) it was possible to
>> define certain tables as being memory resident. This was useful for low
>> volatile data such as salutations, street types, county or state codes,
>> time zones, preferred languages, etc.
>> It saved disk I/O twice. Firstly building your drop down lists and
>> secondly when the entered data hit the server and was validated.
>> It would be good to have a similar feature in PostgreSql.
>> If a table was altered by, say inserting a new street type, then the
>> data base engine has to refresh the cache. This is the only overhead.
>>
>> Cheers,
>> Robert
>>
>
> For this purpose (building drop down lists, salutations, street types,
> county or state codes), I keep a permanent data cache at app server side
> (after all, they will be shared among all users - even on a multi tenant
> application). This avoids network connection, and keep database server
> memory available for database operations (like reporting and transactions).
> But I agree there are lots of gaings having a "in memory" option for
> tables and so. I believe PostgreSQL already does that automatically (most
> used tables are kept in memory cache).
>
> Edson.
>
>
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Keller 2013-11-17 21:33:30 Re: Postgres as In-Memory Database?
Previous Message Edson Richter 2013-11-17 20:57:23 Re: Partitioning and triggers