Re: PostgreSQL as a local in-memory cache

From: Steve Wampler
Subject: Re: PostgreSQL as a local in-memory cache
Date: ,
Msg-id: 4C17A417.2040600@noao.edu
(view: Whole thread, Raw)
In response to: Re: PostgreSQL as a local in-memory cache  (Chris Browne)
Responses: Re: PostgreSQL as a local in-memory cache  (Craig James)
List: pgsql-performance

Tree view

Re: PostgreSQL as a local in-memory cache  (Chris Browne, )
 Re: PostgreSQL as a local in-memory cache  (Steve Wampler, )
  Re: PostgreSQL as a local in-memory cache  (Craig James, )
 Re: PostgreSQL as a local in-memory cache  ("", )
 Re: PostgreSQL as a local in-memory cache  (Chris Browne, )
  Re: PostgreSQL as a local in-memory cache  (Jaime Casanova, )
  Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
 Re: PostgreSQL as a local in-memory cache  ("", )
  Re: PostgreSQL as a local in-memory cache  (Mark Kirkwood, )
  Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
   Re: PostgreSQL as a local in-memory cache  (Jonathan Gardner, )
  Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
  Re: PostgreSQL as a local in-memory cache  (Greg Smith, )
   Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
    Re: PostgreSQL as a local in-memory cache  (Jonathan Gardner, )
     Re: PostgreSQL as a local in-memory cache  ("Pierre C", )
   Re: PostgreSQL as a local in-memory cache  (Jonathan Gardner, )
  Re: PostgreSQL as a local in-memory cache  (Alvaro Herrera, )
  Re: PostgreSQL as a local in-memory cache  (Josh Berkus, )
   Re: PostgreSQL as a local in-memory cache  (Jonathan Gardner, )
    Re: PostgreSQL as a local in-memory cache  (Balkrishna Sharma, )
   Re: PostgreSQL as a local in-memory cache  (Craig James, )

Chris Browne wrote:
> "" <> writes:
>> My question is how can I configure the database to run as quickly as
>> possible if I don't care about data consistency or durability? That
>> is, the data is updated so often and it can be reproduced fairly
>> rapidly so that if there is a server crash or random particles from
>> space mess up memory we'd just restart the machine and move on.
>
> For such a scenario, I'd suggest you:
>
> - Set up a filesystem that is memory-backed.  On Linux, RamFS or TmpFS
>   are reasonable options for this.
>
> - The complication would be that your "restart the machine and move
>   on" needs to consist of quite a few steps:
>
>   - recreating the filesystem
>   - fixing permissions as needed
>   - running initdb to set up new PG instance
>   - automating any needful fiddling with postgresql.conf, pg_hba.conf
>   - starting up that PG instance
>   - creating users, databases, schemas, ...

Doesn't PG now support putting both WAL and user table files onto
file systems other than the one holding the PG config files and PG
'admin' tables?  Wouldn't doing so simplify the above considertably
by allowing just the WAL and user tables on the memory-backed file
systems?  I wouldn't think the performance impact of leaving
the rest of the stuff on disk would be that large.

Or does losing WAL files mandate a new initdb?

--
Steve Wampler -- 
The gods that smiled on your birth are now laughing out loud.


pgsql-performance by date:

From: Yeb Havinga
Date:
Subject: Re: B-Heaps
From: Jaime Casanova
Date:
Subject: Re: PostgreSQL as a local in-memory cache